Migration to the CDB Architecture
Transcript of Migration to the CDB Architecture
![Page 1: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/1.jpg)
Migration to the CDB Architecture
30-APR-2020
Mike DietrichMaster Product ManagerDatabase Upgrade and Migrations@MikeDietrichDE
Laura Garcia VillarealOU PreSales Manager
![Page 2: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/2.jpg)
Mike Dietrich
Master Product ManagerDatabase Upgrade and Migrations https://MikeDietrichDE.com
@MikeDietrichDECopyright © 2020 Oracle and/or its affiliates.
![Page 3: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/3.jpg)
Slides | https://MikeDietrichDE.com
Copyright © 2020 Oracle and/or its affiliates.
![Page 4: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/4.jpg)
Agenda
AutoUpgrade and CDB Migration
Oracle Multitenant
Further Information
Copyright © 2020 Oracle and/or its affiliates.
1
2
3
![Page 5: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/5.jpg)
AutoUpgrade
Copyright © 2020 Oracle and/or its affiliates.
The recommended way to upgrade databases
Ph
oto
by
Josh
ua
So
rtin
oo
n U
nsp
lash
![Page 6: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/6.jpg)
Download | Get the latest autoupgrade.jar
• MOS Note: 2485457.1
Copyright © 2020 Oracle and/or its affiliates.
![Page 7: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/7.jpg)
Upgrade | AutoUpgrade
Copyright © 2020 Oracle and/or its affiliates.
upg>
Job Console
11.2.0.412.1.0.2
12.2.0.1
18c
autoupgrade.jarMOS Note: 2485457.1
2MB
config.cfg
autoupgrade.jar
12.2.0.1
18.5.0
19c
19c
![Page 8: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/8.jpg)
AutoUpgrade to Oracle 19c
Migration to Oracle Multitenant
Copyright © 2020 Oracle and/or its affiliates.
Ph
oto
by
Ma
thia
s Je
nse
no
n U
nsp
lash
![Page 9: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/9.jpg)
Oracle Multitenant | Oracle 19c
• You don't have to use Oracle Single-/Multitenant with Oracle 19c
• Oracle 18c and Oracle 19c belong to the Oracle Database 12.2 release family
• For further details see MOS Note: 742060.1
Copyright © 2020 Oracle and/or its affiliates.
![Page 10: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/10.jpg)
And by the way …
• Since Oracle 19c you can have 3 user-created PDBs without need for a Multitenant license!!!
• https://mikedietrichde.com/2019/09/17/3-pdbs-included-with-oracle-19c-and-desupport-of-non-cdbs-with-20c/
Copyright © 2020 Oracle and/or its affiliates.
![Page 11: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/11.jpg)
Upgrade to 19c | Migration to Multitenant
Copyright © 2020 Oracle and/or its affiliates.
Oracle 11.2.04
AutoUpgrade
Oracle 19.7.0
CDB
PDB$SEED
Oracle 19.7.0
CDB
PDB$SEED
1 ⃣ 2 ⃣ Plug into CDB
3️ ⃣ noncdb_to_pdb.sql
Oracle 19.7.0
Conversion with
AutoUpgrade One-Command Orchestration
![Page 12: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/12.jpg)
AutoUpgrade | Migration to Multitenant
• Use this parameter in your config file• The receiving CDB must be precreated already
#
# Specify the SID of the target CDB to plug into after upgrade
#
upg2.target_cdb=CDB2
Copyright © 2020 Oracle and/or its affiliates.
![Page 13: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/13.jpg)
Agenda
AutoUpgrade and CDB Migration
Oracle Multitenant
Further Information
Copyright © 2020 Oracle and/or its affiliates.
1
2
3
![Page 14: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/14.jpg)
Migration
Oracle Multitenant
Copyright © 2020 Oracle and/or its affiliates.
![Page 15: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/15.jpg)
• Non-CDB• No change to
previous releases
Copyright © 2020 Oracle and/or its affiliates.
Oracle Multitenant | Deployments 19c
• CDB: Three Tenants• No extra license
• Available with SE2 / EE
• Three user-created PDBs included
• SPFILE: max_pdbs=3
• CDB: Multitenant• Multitenant license
required
• Available with EE only
• Up to 252 PDBs
• Up to 4096 PDBs in the Cloud and on Engineered Systems
PDB$SEED
PDB$SEED
…
![Page 16: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/16.jpg)
Oracle Multitenant | Concept
CDB1
PDB$SEED
CDB2
PDB$SEED
CDB3
PDB$SEED
PDB$SEED
Copyright © 2020 Oracle and/or its affiliates.
![Page 17: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/17.jpg)
Redo Control Flashbackspfile
PDB$SEED
Oracle Multitenant | Resource Sharing
Copyright © 2020 Oracle and/or its affiliates.
![Page 18: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/18.jpg)
Oracle Multitenant | Connecting
• CDB$ROOT• $> sqlplus / as sysdba
• PDB• $> sqlplus "sys/oracle@PDB1 as sysdba"
• $> sqlplus "sys/oracle@//localhost/pdb1 as sysdba"
• $> export TWO_TASK=pdb1
$> sqlplus "sys/oracle as sysdba"
• Switch between containers• SQL> alter session set container=pdb1;
• SQL> alter session set container=cdb$root;
CDB
PDB$SEED
CDB
PDB$SEED
CDB
PDB$SEED
Copyright © 2020 Oracle and/or its affiliates.
![Page 19: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/19.jpg)
Oracle Multitenant | Resource Manager
• Memory Management• SGA_MIN_SIZE - minimum sga size
• IO Resource Managment [IORM]• MAX_IOPS - maximum I/O requests per second
• MAX_MBPS - maximum MB per second of I/O
• Can't be set in the CDB$ROOT and on Exadata
• Can be dynamically altered
• CPU Consumption• CPU_COUNT - number of cpu cores
Can be set onPDB level
Copyright © 2020 Oracle and/or its affiliates.
![Page 20: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/20.jpg)
Oracle Multitenant | Components/Options
• Create CDBs with fewer options: DBCA's "CUSTOM" mode creation• https://mikedietrichde.com/2018/08/08/creating-cdbs-non-cdbs-with-
less-options/
Copyright © 2020 Oracle and/or its affiliates.
![Page 21: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/21.jpg)
Oracle Multitenant | Components/Options
• Only "Advanced Configuration" + "Custom Database" gives you:
Copyright © 2020 Oracle and/or its affiliates.
Be aware!
Be really aware!
![Page 22: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/22.jpg)
Oracle Multitenant | Components/Options
• Remove or add options• https://mikedietrichde.com/2017/07/26/remove-clean-components-
oracle-11-2-12-2/
Copyright © 2020 Oracle and/or its affiliates.
![Page 23: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/23.jpg)
Oracle Multitenant | catcon.pl
• Execute scripts with catcon.pl• MOS Note: 1932340.1 - How to execute sql scripts in Multitenant environment
(catcon.pl)
• Example: Run preupgrade_fixups.sql in all containers
$> $ORACLE_HOME/perl/bin/perl
$ORACLE_HOME/rdbms/admin/catcon.pl
-n 1
-d $ORACLE_BASE/cfgtoollogs/UPGR/preupgrade
-l /home/oracle/upgrade
-b preupfix
preupgrade_fixups.sql
Copyright © 2020 Oracle and/or its affiliates.
![Page 24: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/24.jpg)
Oracle Multitenant | Local Undo
• Default since Oracle 12.2.0.1• Requirement for Flashback Pluggable Database, Hot Cloning and other features
• In STARTUP UPGRADE mode: SQL> alter database local undo ON;
SYSTEM
SYSAUX
TEMP
UNDO
DATA
SYSTEM
SYSAUX
TEMP
UNDO
DATA
SYSTEM
SYSAUX
TEMP
UNDO
CDB
PDB$SEED
Copyright © 2020 Oracle and/or its affiliates.
![Page 25: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/25.jpg)
Oracle Multitenant | Creation of a PDB
• Fast provisioning:
• Admin user can be deleted afterwards
• PDB is ready to use within seconds
create pluggable database PDB1
admin user adm identified by pwd
file_name_convert=('pdbseed',’pdb1');
CDB1
PDB$SEEDPDB$SEED
Copyright © 2020 Oracle and/or its affiliates.
![Page 26: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/26.jpg)
• Local cloning:
• parallel can speed up the process• Default: cpu_count
• Monitoring in v$session_longops
• kpdbfCopyTaskCbk (datafile copy)
• kcrfremnoc (redo file copy)
Oracle Multitenant | Cloning of a PDB
• Remote cloning via Database Link:
create pluggable database PDB2 from
PDB1 file_name_convert=('pdb1','pdb2')
parallel 8;
create pluggable database PDB1 from
PDB1@dblink_to_cdb1
file_name_convert=('CDB1','CDB2');
CDB1
PDB$SEEDPDB$SEED
CDB1
PDB$SEED
CDB2
PDB$SEED
Copyright © 2020 Oracle and/or its affiliates.
![Page 27: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/27.jpg)
Oracle Multitenant | Hot Cloning insightsP P P P P
P P P P
P P P
PP P
DataFile2DataFile1 Undo
− Source PDB remains open for read and write− Read and copy in parallel− On-going operations imply a “dirty read”− Some data changes not included in initial file copy− Ship and apply redo to catch up with source− Apply undo to rollback uncommitted transactions
DataFile1 DataFile2Undo
Redo Log
P P P P P
P P P P
P P P
PP P
P P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P P
P
P P
P
P
P
P
P
P P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
Legend
Uncommitted blockchanged in intervalBlock changed in intervalCommitted in intervalUncommitted redoUndo written in intervalCommitted in interval
P
P
Copyright © 2020 Oracle and/or its affiliates.
![Page 28: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/28.jpg)
Oracle Multitenant | Relocate a PDB
• Relocate via Database Link:create pluggable database PDB1 from PDB1@dblink_to_cdb1
relocate availability max
file_name_convert=('/oradata/CDB1/pdb1','/oradata/CDB2/pdb1');
CDB1
PDB$SEED
CDB2
PDB$SEED
Redo
Redo
Copyright © 2020 Oracle and/or its affiliates.
![Page 29: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/29.jpg)
Oracle Multitenant | Upgrade and Plugin
• Upgrade non-CDB to CDB version
• Start database read only
• Create XML manifest file
• Shutdown database
• Plug into CDB
• Sanity script
• https://mikedietrichde.com/2017/03/08/converting-an-12-1-non-cdb-and-plug-it-into-an-12-2-cdb/
exec DBMS_PDB.DESCRIBE('PDB1.xml');
create pluggable database PDB1
using ('PDB1.xml') nocopy tempfile reuse;
start ?/rdbms/admin/noncdb_to_pdb.sql
CDB1
PDB$SEED
PDB1
xml
Read Only
noncdb_to_pdb.sql
Copyright © 2020 Oracle and/or its affiliates.
![Page 30: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/30.jpg)
Oracle Multitenant | noncdb_to_pdb.sql
• Sanity script when plugging in a stand-alone database
• Irreversible
• Runs only once in the life of a database
• Rerunnable starting with 12.2
• Runtime depends ...
• See also:https://mikedietrichde.com/2017/06/08/noncdb_to_pdb-sql-take-long/
Copyright © 2020 Oracle and/or its affiliates.
![Page 31: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/31.jpg)
Oracle Multitenant | Full Transportable Export/Import
• Create a new PDB
• Create a database link
• Set tablespaces read only in source
• Copy data files
• Run impdp:impdp oow/passwd@PDB1
NETWORK_LINK=DB1 VERSION=12 FULL=Y
TRANSPORTABLE=ALWAYS METRICS=Y
LOGFILE=oow_dir:src112fullimp.log
TRANSPORT_DATAFILES='/oradata/ts1.dbf' …
CDB1
PDB$SEED
TablespacesRead Only
Datab
ase Link
impdp
Copyright © 2020 Oracle and/or its affiliates.
![Page 32: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/32.jpg)
Oracle Multitenant | Upgrade
Everything at once Unplug + Plug + Upgrade
CDB1
PDB$SEED
CDB1
PDB$SEED
PDB$SEED
CDB1
PDB$SEED
CDB2
PDB$SEED
PDB$SEED
Upgrade
UpgradeUpgrade
Upgrade
Upgrade
Copyright © 2020 Oracle and/or its affiliates.
![Page 33: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/33.jpg)
Oracle Multitenant | PDB Archive
• Unplug the PDB including all files
• See also:https://mikedietrichde.com/2017/05/22/issue-with-pdb-archives-in-oracle-12-2-0-1-in-asm
ALTER PLUGGABLE DATABASE pdb1
UNPLUG INTO '/home/oracle/pdb1.pdb'
$ unzip pdb1.pdb
Archive: pdb1.pdb
inflating: system01.dbf
inflating: sysaux01.dbf
inflating: undotbs01.dbf
warning: stripped absolute path spec from /home/oracle/pdb1.xml
inflating: home/oracle/pdb1.xml
Copyright © 2020 Oracle and/or its affiliates.
![Page 34: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/34.jpg)
Oracle Multitenant | Save State
• You need to startup a PDB• ALTER PLUGGABLE DATABASE pdb1 OPEN;
• By default PDBs need to be started manually• ALTER PLUGGABLE DATABASE pdb1 SAVE STATE;
• This preserves the last state of a PDB
• ALTER PLUGGABLE DATABASE pdb1 DISCARD STATE;
• This removes any state preservation
Copyright © 2020 Oracle and/or its affiliates.
![Page 35: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/35.jpg)
Oracle Multitenant | CON_ID
• Views:• USER_...
• ALL_...
• DBA_...
• CDB_... - CDB_views have CON_ID column• Plus some very creative names: PDB_...
• CON_ID
• 0: Pertains to the entire database
• 1: Object belongs to CDB$ROOT container
• 2: Object belongs to PDB$SEEDSet _exclude_seed_cdb_view=FALSE to see PDB$SEED's objects
• 3-4096: Object belongs to PDB with this CON_ID
Copyright © 2020 Oracle and/or its affiliates.
![Page 36: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/36.jpg)
Oracle Multitenant | Character Sets
• Since Oracle 12.2.0.1:• Mix of different character sets is possible
• CDB$ROOT must be AL32UTF8 to allow mixtures
Ph
oto
by
Erik
Eas
tman
on
Un
spla
sh
Copyright © 2020 Oracle and/or its affiliates.
![Page 37: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/37.jpg)
Oracle Multitenant | Flashback PDB
• Requirement: Local Undo configured
• How to?• SQL> alter session set container=PDB1;
• SQL> create restore point GRP guarantee flashback database;
• <…do something …>
• SQL> shutdown immediate
• SQL> flashback pluggable database PDB1 to restore point GRP;
• SQL> alter pluggable database PDB1 open resetlogs; *
• SQL> drop restore point GRP;
Copyright © 2020 Oracle and/or its affiliates.
![Page 38: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/38.jpg)
Multitenant | Silent Compatible Change
• Be aware when youunplug/plug betweendifferent environments• Default COMPATIBLE=19.0.0
• PDB's COMPATIBLE = CDB$ROOT's COMPATIBLE
No issue
• PDB's COMPATIBLE < CDB$ROOT's COMPATIBLE
PDB's COMPATIBLE will be increased automatically
No PDB downgrade will be possible in this case!
• PDB's COMPATIBLE > CDB$ROOT's COMPATIBLE
PDB can't be plugged in
Copyright © 2020 Oracle and/or its affiliates.
Au
tom
atically
COMPATIBLE=12.2.0
COMPATIBLE=19.0.0
COMPATIBLE=19.0.0
CDB1
PDB$SEED
CDB2
PDB$SEED
![Page 39: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/39.jpg)
Migration Strategies
Migration to and Fallback with Oracle Multitenant
Copyright © 2020 Oracle and/or its affiliates.
Ph
oto
by
Jack
man
Ch
iuo
n U
nsp
lash
![Page 40: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/40.jpg)
Move to Multitenant | High Level Overview
• Two approaches• Upgrade to matching version of CDB, then plugin as new PDB, then run sanity
script
• Migrate directly into PDB with Data Pump, TTS or FTEX
• Every approach requires unpredictable, often significant downtime• Can be reduced with Oracle GoldenGate
• Proven upgrade fallback strategies don't work• Export/import with Data Pump necessary as fallback
• Oracle GoldenGate can be used on top
Copyright © 2020 Oracle and/or its affiliates.
![Page 41: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/41.jpg)
Move to Multitenant | Typical Pitfalls
• DB components (e.g. Spatial, Label Security, Java etc.) not matching
• Patch levels
• noncdb_to_pdb.sql requires downtime
• Some features work differently • Unified Auditing
• Standby implementation, especially in ASM
• Performance monitoring, e.g. AWR
Copyright © 2020 Oracle and/or its affiliates.
![Page 42: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/42.jpg)
Move to Multitenant | Your "best" friend
• PDB_PLUG_IN_VIOLATIONS• select con_id, type, message, status from PDB_PLUG_IN_VIOLATIONS
where status<>'RESOLVED' order by time;
Copyright © 2020 Oracle and/or its affiliates.
![Page 43: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/43.jpg)
Non-CDB to CDB | Migrate with any technique
• Includes Data Pump, Transportable Tablespaces etc.
Oracle 10.1.0.2
Provisionnew PDB
Oracle 19.5.0
CDB
PDB$SEED
1⃣
2⃣ Migrate
Copyright © 2020 Oracle and/or its affiliates.
![Page 44: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/44.jpg)
Move to Multitenant | TTS MigrationSource - non-CDB Target - PDB
Views
Code
Grants
Trigger
DATATS
Alter UserCreate User
Set tablespaces read-only
Copy tablespace files DATATS
Export/import tablespace content info
Set tablespaces read-write
Rebuild logic (code, views, grants, roles, synonyms etc)
Views
Code
Grants
Trigger
Create new CDB/PDB
PDB$SEED
PDB
Copyright © 2020 Oracle and/or its affiliates.
![Page 45: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/45.jpg)
Non-CDB to CDB | Data Pump with Dumpfile
Oracle 11.2.0.4
Provisionnew PDB
Oracle 19.3.0
CDB
PDB$SEED
1⃣
2⃣ expdp
DUMP FILE DUMP FILE
3⃣ impdp
Copyright © 2020 Oracle and/or its affiliates.
![Page 46: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/46.jpg)
Non-CDB to CDB | Data Pump over NETWORK_LINK
Oracle 11.2.0.4
Provisionnew PDB
Oracle 19.3.0
CDB
PDB$SEED
1⃣2⃣
3⃣impdp withNETWORK_LINK
CreateDB Link
Copyright © 2020 Oracle and/or its affiliates.
![Page 47: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/47.jpg)
Non-CDB to CDB | Fallback: Data Pump w. dumpfile
Oracle 11.2.0.4
Oracle 19.3.0
CDB
PDB$SEED
1⃣2⃣expdp withVERSION=11.2.0.4
DUMP FILE DUMP FILE
impdp
Copyright © 2020 Oracle and/or its affiliates.
![Page 48: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/48.jpg)
Non-CDB to CDB | Upgrade
Oracle 11.2.0.4
Au
toU
pgr
ade
to O
racl
e 1
9c
Oracle 19.5.0
Oracle 19.5.0
CDB
PDB$SEED
Oracle 19.5.0
CDB
PDB$SEED
1️ ⃣
2️ ⃣ Plug into CDB
3️ ⃣ noncdb_to_pdb.sql
Copyright © 2020 Oracle and/or its affiliates.
![Page 49: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/49.jpg)
Non-CDB to CDB | Upgrade - Fallback
Oracle 11.2.0.4
Au
toU
pgr
ade
to O
racl
e 1
9c
Oracle 19.5.0
Oracle 19.5.0
CDB
PDB$SEED
Oracle 19.5.0
CDB
PDB$SEED
1️ ⃣
2️ ⃣ Plug into CDB
3️ ⃣ noncdb_to_pdb.sql
Flashbackto GRP
Copyright © 2020 Oracle and/or its affiliates.
![Page 50: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/50.jpg)
Move to Multitenant | Fallback for upgrades?
• Move to Multitenant is always a "Migration"
• Usual techniques don't exist• No downgrade
• No flashback to GRP
• Only available options• Data Pump export/import
• Oracle GoldenGate
Copyright © 2020 Oracle and/or its affiliates.
![Page 51: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/51.jpg)
A typical example from the Real World
Migrating to Oracle Multitenant with a distant physical standby database in place
Copyright © 2020 Oracle and/or its affiliates.
![Page 52: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/52.jpg)
Non-CDB to CDB with Standby | Initial Setup
Oracle 12.1.0.2
PROD10 TB size
Oracle 12.1.0.2
STBDY10 TB size
100 km distanceMaximum Protection
Copyright © 2020 Oracle and/or its affiliates.
![Page 53: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/53.jpg)
Non-CDB to CDB with Standby | AutoUpgrade
Oracle 19.7.0
PROD
Oracle 12.1.0.2
STBDY
Disable Broker - Defer Log Transport
Copyright © 2020 Oracle and/or its affiliates.
Oracle 12.1.0.2
PROD
![Page 54: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/54.jpg)
Non-CDB to CDB with Standby | Upgrade
Oracle 19.7.0
PRODOracle 12.1.0.2
STBDY
Oracle 19.7.0
PROD
Enable Log TransportEnable Broker
Copyright © 2020 Oracle and/or its affiliates.
![Page 55: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/55.jpg)
Non-CDB to CDB with Standby | Upgrade
Oracle 12.1.0.2
STBDY
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
Up
grad
evi
a R
edo
Ap
ply
Copyright © 2020 Oracle and/or its affiliates.
![Page 56: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/56.jpg)
Non-CDB to CDB with Standby | Creation of CDB
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
CDB
PDB$SEED
CDB
PDB$SEED
Copyright © 2020 Oracle and/or its affiliates.
![Page 57: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/57.jpg)
Non-CDB to CDB with Standby | Conversion
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
CDB
PDB$SEED
CDB
PDB$SEED
PDB1
xml
Read Only
noncdb_to_pdb.sql
(runtime varies)
ASMAliasList
Execute in standby ASM instance
>> DOWNTIME <<
Copyright © 2020 Oracle and/or its affiliates.
![Page 58: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/58.jpg)
Non-CDB to CDB with Standby | Plugin of STBY
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
Oracle 19.7.0
PRODOracle 19.7.0
STBDY
CDB
PDB$SEED
CDB
PDB$SEED
>> DOWNTIME <<
Copyright © 2020 Oracle and/or its affiliates.
![Page 59: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/59.jpg)
Non-CDB to CDB with Standby | Plugin of STBY
• Read more …• Data Guard PM:
http://www.stepi.net/2019/06/08/to-cdb-or-not-to-cdb-thats-the-question/
• MAA Team:MOS Note: 2273304.1Reusing the Source Standby Database Files When Plugging a non-CDB as a PDB into the Primary Database of a Data Guard Configuration
Copyright © 2020 Oracle and/or its affiliates.
![Page 60: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/60.jpg)
Move to Multitenant | Summary
• Every migration is an architectural change
• Every migration requires downtime• Incremental backup procedures can lower migration downtime
• Oracle GoldenGate can help decreasing the downtime
Copyright © 2020 Oracle and/or its affiliates.
![Page 61: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/61.jpg)
Agenda
AutoUpgrade and CDB Migration
Oracle Multitenant
Further Information
Copyright © 2020 Oracle and/or its affiliates.
1
2
3
![Page 62: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/62.jpg)
https://mikedietrichde.com/2019/07/22/database-migration-from-non-cdb-to-pdb-overview/
Copyright © 2020 Oracle and/or its affiliates.
![Page 63: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/63.jpg)
https://mikedietrichde.com/2019/07/22/database-migration-from-non-cdb-to-pdb-overview/
Copyright © 2020 Oracle and/or its affiliates.
![Page 64: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/64.jpg)
Further Information
Finally …
Copyright © 2020 Oracle and/or its affiliates.
![Page 65: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/65.jpg)
Slides | https://MikeDietrichDE.com
Copyright © 2020 Oracle and/or its affiliates.
![Page 66: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/66.jpg)
HOL | https://MikeDietrichDE.com
Copyright © 2020 Oracle and/or its affiliates.
![Page 67: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/67.jpg)
Questions?
Thank you for your attention!
Copyright © 2020 Oracle and/or its affiliates.
![Page 68: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/68.jpg)
Copyright © 2020 Oracle and/or its affiliates.
68
Oracle UniversityTraining Solutions
Laura Garcia VillarrealOU PreSales ManagerApril [email protected]
![Page 69: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/69.jpg)
Copyright © 2020 Oracle and/or its affiliates.
Introducing Oracle University
Learning Methods
Oracle Database Multitenant Training
Program Agenda
![Page 70: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/70.jpg)
Introducing Oracle University
Oracle University is the official provider of training and certification for Oracle technologies and products.
Copyright © 2020 Oracle and/or its affiliates.
![Page 71: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/71.jpg)
Oracle University Provides Training Options for Every Learner and Business
Training On Demand
Recorded courses available via streaming for 90 days
Learning Subscription
Digital learning modules available via streaming for 1 year
Classroom Training
Traditional instructor-led training
Live Virtual Class
Instructor-led courses via Internet
Self-study Learning Instructor-led Training
Blended LearningCombination of instructor-led and self-study learning
Copyright © 2020 Oracle and/or its affiliates.
![Page 72: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/72.jpg)
30% Discount on Oracle Learning Subscriptions until May 31st 2020
➢ Pre-recorded Videos
➢ Captions and transcript
➢ Skill Checks
➢ Virtual Labs
➢ Course Manual
➢ Ask the Instructor
![Page 73: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/73.jpg)
Multitenant Training
• Inside Database Administration training path
• Versions supported: 19c, 18c and 12c
• 4 days training
• Main topics: CDB basics, PDB Creation, Security, Upgrades Methods, Backup&Duplicate, Storage, Data Movement…
• Multitenant environment available to run labs
Copyright © 2020 Oracle and/or its affiliates.
![Page 74: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/74.jpg)
Questions?
Thank you for your attention!
Copyright © 2020 Oracle and/or its affiliates.
![Page 75: Migration to the CDB Architecture](https://reader031.fdocuments.in/reader031/viewer/2022020707/61fdb310e435703a7525441a/html5/thumbnails/75.jpg)
Copyright © 2020 Oracle and/or its affiliates.
75
Contact Me
Laura Garcia VillarrealOU PreSales ManagerApril [email protected]