SlideShare a Scribd company logo
1 of 75
Migration to the CDB
Architecture
30-APR-2020
Mike Dietrich
MasterProductManager
DatabaseUpgradeand Migrations
@MikeDietrichDE
LauraGarcia Villareal
OU PreSalesManager
Mike Dietrich
Master Product Manager
Database Upgrade and Migrations https://MikeDietrichDE.com
@MikeDietrichDE
Copyright©2020 Oracleand/or its affiliates.
Slides | https://MikeDietrichDE.com
Copyright©2020 Oracleand/or its affiliates.
Agenda
AutoUpgrade and CDB Migration
Oracle Multitenant
Further Information
1
2
3
Copyright©2020 Oracleand/or its affiliates.
AutoUpgrade
The recommended wayto
upgrade databases
Photo
by
Joshua
Sortino
on
Unsplash
Copyright©2020 Oracleand/or its affiliates.
Download | Get the latest autoupgrade.jar
• MOSNote:2485457
.
1
Copyright©2020 Oracleand/or its affiliates.
Upgrade | AutoUpgrade
upg>
Job Console
11.2.0.4
1
2
.
1
.0.2
1
2
.2.0.
1
18c
autoupgrade.jar
MOSNote:2485457
.
1
2MB
config.cfg
autoupgrade.jar
1
2
.2.0.
1
18.5.0
19c
19c
Copyright©2020 Oracleand/or its affiliates.
AutoUpgrade to Oracle 19c
Migration to
Oracle Multitenant
Photo
by
Mathias
Jensen
on
Unsplash
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | Oracle 19c
• You don't have to use Oracle Single-/Multitenant with Oracle 19c
• Oracle 18cand Oracle 19cbelong to the Oracle Database 12.2release family
• For further details see MOSNote:742060.
1
Copyright©2020 Oracleand/or its affiliates.
And by the way …
• Since Oracle 19cyou can have 3user-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 Oracleand/or its affiliates.
Upgrade to 19c | Migration to Multitenant
Oracle 1
1
.2.04
CDB
Oracle 1
9.
7
.0
PDB$
SEED
CDB
Oracle 1
9.
7
.0
PDB
$
SEED
1
⃣ AutoUpgrade 2⃣ Plug into CDB
3️ noncdb_to_pdb.sql
Oracle 1
9.
7
.0
⃣ Conversionwith
AutoUpgrade One-Command Orchestration
Copyright©2020 Oracleand/or its affiliates.
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 Oracleand/or its affiliates.
Agenda
AutoUpgrade and CDB Migration
Oracle Multitenant
Further Information
1
2
3
Copyright©2020 Oracleand/or its affiliates.
Migration
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant
• Non-CDB
• No change to
previous releases
Oracle Multitenant | Deployments 19c
• No extra license
• Available with SE2/ EE
• Three user-created
PDBsincluded
• SPFILE:max_pdbs=3
• CDB:Three T
enants • CDB:Multitenant
• Multitenant license
required
• Available with EE only
• Up to 252PDBs
• Up to 4096 PDBs in
the Cloud and on
Engineered Systems
PDB$
SEED
PDB$
SEED
Copyright©2020 Oracleand/or its affiliates.
…
Oracle Multitenant | Concept
CDB2
PDB$
SEED
CDB3
PDB$
SEED
PDB$
S
S
E
E
E
E
D
D
CDB1
Copyright©2020 Oracleand/or its affiliates.
Redo Control Flashback
spfile
PDB$
SEED
Oracle Multitenant | Resource Sharing
Copyright©2020 Oracleand/or its affiliates.
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 Oracleand/or its affiliates.
Oracle Multitenant | Resource Manager
• MAX_MBPS - maximum MB per second of I/O
• Can't be setin the CDB$ROOT and on Exadata
• Can be dynamically altered
• CPU Consumption
• CPU_COUNT - number of cpu cores
• Memory Management
• SGA_MIN_SIZE - minimum sga size
• IOResource Managment [IORM]
• MAX_IOPS - maximum I/O requests per second
Can be set on
Copyright©2020 Oracleand/or its affiliates.
PDB level
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 Oracleand/or its affiliates.
Oracle Multitenant | Components/Options
• Only "Advanced Configuration" +"Custom Database" gives you:
Be aware!
Copyright©2020 Oracleand/or its affiliates.
Be really aware!
Oracle Multitenant | Components/Options
• Remove or add options
• https://mikedietrichde.com/2017/07/26/remove-clean-components-
oracle-11-2-12-2/
Copyright©2020 Oracleand/or its affiliates.
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 Oracleand/or its affiliates.
Oracle Multitenant | Local Undo
• Default since Oracle 1
2
.2.0.
1
• Requirement for Flashback Pluggable Database,Hot Cloning and other features
• InSTARTUP 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 Oracleand/or its affiliates.
Oracle Multitenant | Creation of a PDB
• Fast provisioning:
• Admin user can be deleted afterwards
• PDB is readyto use within seconds
create pluggable database PDB1
admin user adm identified by pwd
file_name_convert=('pdbseed',’pdb1');
CDB1
Copyright©2020 Oracleand/or its affiliates.
PDB$
SEED
• Local cloning:
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');
P
P
D
D
B
B
$
$
S
S
E
E
E
E
D
D
CDB1
• parallel can speed up the process
• Default:cpu_count
• Monitoring in
v$session_longops
• kpdbfCopyTaskCbk (datafile copy)
• kcrfremnoc (redo file copy)
PDB$
SEED
CDB1
PDB$
SEED
CDB2
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | Hot Cloning insights
DataFile2
DataFile1 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 DataFile2
Undo
Redo Log
🗸 🗸 🗸 🗸 🗸
🗸 🗸 🗸 🗸
🗸 🗸 🗸
🗸 🗸 🗸
🗸
🗸 🗸 🗸
🗸 🗸 🗸 🗸
🗸 🗸 🗸 🗸
🗸 🗸
🗸 🗸
🗸 🗸 🗸 🗸 🗸 🗸
🗸 🗸 🗸
🗸 🗸
🗸 🗸 🗸
🗸
🗸
🗸 🗸 🗸
🗸
🗸
🗸
🗸 🗸
🗸
🗸 🗸
🗸
🗸
🗸 🗸
🗸 🗸
🗸 🗸
🗸
🗸 🗸
🗸
🗸 🗸
🗸
🗸
🗸
Legend
Uncommitted block
changed in interval
Block changed in interval
Committed in interval
Uncommitted redo
Undo written in interval
Committed in interval
🗸
🗸
Copyright©2020 Oracleand/or its affiliates.
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');
CDB2
PDB$
SEED
CDB1
Redo
PDB$
SEED
Redo
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | Upgrade and Plugin
• Shutdown database
• Plug into CDB
• Sanityscript
• https://mikedietrichde.com/2017/03/08/converting-an-12-1-non-cdb-and-plug-it-into-an-12-2-cdb/
• Upgrade non-CDB to CDB version
• Startdatabaseread only
• Create XML manifest file
exec DBMS_PDB.DESCRIBE('PDB1.xml');
create pluggable database PDB1
using ('PDB1.xml') nocopy tempfile reuse;
start ?/rdbms/admin/noncdb_to_pdb.sql
PDB$
SEED
PDB1
xml
Read Only
CDB1
noncdb_to_pdb.sql
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | noncdb_to_pdb.sql
Copyright©2020 Oracleand/or its affiliates.
• Sanity script when plugging in a stand-alone database
• Irreversible
• Runs only once in the life of a database
• Rerunnable starting with 1
2
.2
• Runtime depends ...
• See also:
https://mikedietrichde.com/2017/06/08/noncdb_to_pdb-sql-take-long/
Oracle Multitenant | Full Transportable Export/Import
• Create a newPDB
• 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
Tablespaces
ReadOnly
impdp
Database
Link
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | Upgrade
Everything at once Unplug +Plug +Upgrade
CDB1
CDB1
PDB$
SEED
PDB$
S
S
E
E
E
E
D
D
CDB1
Copyright©2020 Oracleand/or its affiliates.
CDB2
P
PD
DB
B$
$
S
S
E
E
E
E
D
D
Upgrade
Upgrade
Upgrade
Upgrade
PD
Up
Bg
$
rade
SEED
Oracle Multitenant | PDB Archive
• Unplug the PDB including all files
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
• See also:
https://mikedietrichde.com/2017/05/22/issue-with-pdb-archives-in-oracle-12-2-0-1-in-asm
Copyright©2020 Oracleand/or its affiliates.
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 anystate preservation
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | CON_ID
• Views:
• USER_...
• ALL_...
• DBA_...
• CDB_... - CDB_views have CON_ID column
• Plus some very creative names:PDB_...
• CON_ID
• 0:
• 1
:
• 2:
• 3-4096:
Pertains to the entire database
Object belongs to CDB$ROOT container
Object belongs to PDB$SEED
Set_exclude_seed_cdb_view=FALSE tosee PDB$SEED's objects
Object belongs to PDB with this CON_ID
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | Character Sets
• Since Oracle 1
2
.2.0.
1
:
• Mix of different character sets is possible
• CDB$ROOT must be AL32UTF8 to allow mixtures
Photo
by
Erik
Eastman
on
Unsplash
Copyright©2020 Oracleand/or its affiliates.
Oracle Multitenant | Flashback PDB
Copyright©2020 Oracleand/or its affiliates.
• 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;
Multitenant | Silent Compatible Change
• Be aware when you
unplug/plug between
different 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
Automatically
Copyright©2020 Oracleand/or its affiliates.
COMPATIBLE=12.2.0
COMPATIBLE=19.0.0
COMPATIBLE=19.0.0
CDB1
PDB$
SEED
CDB2
PDB$
SEED
Migration Strategies
Migration to and Fallback
with Oracle Multitenant
Photo
by
Jackman
Chiu
on
Unsplash
Copyright©2020 Oracleand/or its affiliates.
Move to Multitenant | High Level Overview
Copyright©2020 Oracleand/or its affiliates.
• 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 strategiesdon't work
• Export/import with Data Pump necessary as fallback
• Oracle GoldenGate can be used on top
Move to Multitenant | Typical Pitfalls
Copyright©2020 Oracleand/or its affiliates.
• 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
• Standbyimplementation, especially in ASM
• Performance monitoring,e.g.AWR
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 Oracleand/or its affiliates.
Non-CDB to CDB | Migrate with any technique
• Includes Data Pump, Transportable Tablespaces etc.
Oracle 10.1.0.2
new PDB
CDB
Oracle 19.5.0
PDB$
SEED
1⃣ Provision
2⃣ Migrate
Copyright©2020 Oracleand/or its affiliates.
Move to Multitenant | TTS Migration
Code
Grants
Trigger
DATA
TS
Alter User
Copy tablespace files DATA
TS
Source - non-CDB T
arget - PDB
Views S
S
e
e
t
t
t
t
a
a
b
b
l
e
l
e
s
s
p
p
a
a
c
c
e
e
s
s
r
r
e
e
a
a
d
d-w
-
o
r
n
i
t
l
y
e
Rebuild logic (
E
c
o
x
p
d
o
e
r
,t
v
/
i
i
e
m
w
p
s
o
,rgtr
at
anbtsle,s
r
p
o
a
l
e
c
s
e
,c
s
y
o
n
n
o
t
e
n
n
y
t
m
i
n
sfeotc)
Views
Code
Grants
Trigger
CreaCtreeanteewUCsDerB/PDB
PDB$
SEED
PDB
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB | Data Pump with Dumpfile
Oracle 11.2.0.4
new PDB
CDB
Oracle 19.3.0
PDB$
SEED
1⃣ Provision
2⃣ expdp
DUMP FILE
Copyright©2020 Oracleand/or its affiliates.
DUMP FILE
3⃣ impdp
Non-CDB to CDB | Data Pump over NETWORK_LINK
Oracle 11.2.0.4
new PDB
CDB
Oracle 19.3.0
PDB$
SEED
1⃣ Provision
2
3
impdp with
⃣ NETWORK_LINK
⃣ Create
DB Link
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB | Fallback: Data Pump w. dumpfile
Oracle 11.2.0.4
Oracle 19.3.0
CDB
PDB$
SEED
1⃣
2
expdp with
VERSION=11.2.0.4
DUMP FILE DUMP FILE
Copyright©2020 Oracleand/or its affiliates.
⃣ impdp
Non-CDB to CDB | Upgrade
Oracle 11.2.0.4
AutoUpgrade
to
Oracle
19c
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 Oracleand/or its affiliates.
Non-CDB to CDB | Upgrade - Fallback
Oracle 11.2.0.4
AutoUpgrade
to
Oracle
19c
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
Flashback
to GRP
Copyright©2020 Oracleand/or its affiliates.
Move to Multitenant | Fallback for upgrades?
Copyright©2020 Oracleand/or its affiliates.
• 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
A typical example from the Real W
orld
Copyright©2020 Oracleand/or its affiliates.
Migrating to Oracle Multitenant with a
distant physical standby database in place
Non-CDB to CDB with Standby | Initial Setup
Oracle 12.1.0.2
PROD
10 TB size
Oracle 12.1.0.2
STBDY
10 TB size
100 km distance
Maximum Protection
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB with Standby | AutoUpgrade
Oracle 19.7.0
PROD
Oracle 12.1.0.2
STBDY
Disable Broker - Defer Log Transport
Oracle 12.1.0.2
PROD
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB with Standby | Upgrade
Oracle 19.7.0
PROD
Oracle 12.1.0.2
STBDY
Oracle 19.7.0
PROD
Enable Log Transport
Enable Broker
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB with Standby | Upgrade
Oracle 12.1.0.2
STBDY
Oracle 19.7.0
PROD
Oracle 19.7.0
STBDY
Upgrade
via
Redo
Apply
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB with Standby | Creation of CDB
Oracle 19.7.0
PROD
Oracle 19.7.0
STBDY
CDB
Oracle 19.7.0
PROD
PDB$
SEED
CDB
Oracle 19.7.0
STBDY
PDB$
SEED
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB with Standby | Conversion
Oracle 19.7.0 Oracle 19.7.0
STBDY
CDB
Oracle 19.7.0
PROD
PDB$
SEED
CDB
Oracle 19.7.0
STBDY
PDB$
SEED
PDB1
xml
Read Only
noncdb_to_pdb.sql
(runtime varies)
ASM
PROD
Alias
List
Execute in standby ASM instance
Copyright©2020 Oracleand/or its affiliates.
>> DOWNTIME <<
Non-CDB to CDB with Standby | Plugin of STBY
Oracle 19.7.0
PROD
Oracle 19.7.0
STBDY
CDB
Oracle 19.7.0
PROD
PDB$
SEED
CDB
Oracle 19.7.0
STBDY
PDB$
SEED
>> DOWNTIME <<
Copyright©2020 Oracleand/or its affiliates.
Non-CDB to CDB with Standby | Plugin of STBY
Copyright©2020 Oracleand/or its affiliates.
• Read more …
• Data Guard PM:
http://www.stepi.net/2019/06/08/to-cdb-or-not-to-cdb-thats-the-question/
• MAA T
eam:
MOSNote:2273304.
1
Reusing the Source Standby Database Files When Plugging a non-CDB as a
PDB into the Primary Database of a Data Guard Configuration
Move to Multitenant | Summary
Copyright©2020 Oracleand/or its affiliates.
• Every migration is an architectural change
• Every migration requires downtime
• Incremental backup procedures can lower migration downtime
• Oracle GoldenGate can help decreasing the downtime
Agenda
AutoUpgrade and CDB Migration
Oracle Multitenant
Further Information
1
2
3
Copyright©2020 Oracleand/or its affiliates.
https://mikedietrichde.com/2019/07/22/database-migration-from-non-cdb-to-pdb-overview/
Copyright©2020 Oracleand/or its affiliates.
https://mikedietrichde.com/2019/07/22/database-migration-from-non-cdb-to-pdb-overview/
Copyright©2020 Oracleand/or its affiliates.
Further Information
Copyright©2020 Oracleand/or its affiliates.
Finally …
Slides | https://MikeDietrichDE.com
Copyright©2020 Oracleand/or its affiliates.
HOL | https://MikeDietrichDE.com
Copyright©2020 Oracleand/or its affiliates.
Questions?
Thank you for your attention!
Copyright©2020 Oracleand/or its affiliates.
68
Copyright©2020 Oracleand/or its affiliates.
Oracle University
Training Solutions
Laura Garcia Villarreal
OU PreSales Manager
April 2020
Laura.x.Garcia@oracle.com
Introducing Oracle University
Learning Methods
Oracle DatabaseMultitenant Training
Copyright©2020 Oracleand/or its affiliates.
Program Agenda
Introducing Oracle University
Copyright©2020 Oracleand/or its affiliates.
Oracle University is the official provider of training and
certification for Oracle technologies and products.
Oracle University ProvidesTraining Options for Every Learner and Business
Copyright©2020 Oracleand/or its affiliates.
Training On Demand
Recorded courses
available via streaming
for 90 days
Learning Subscription
Digital learning
modules available via
streaming for 1year
ClassroomTraining
Traditionalinstructor-
led training
Live Virtual Class
Instructor-led courses
via Internet
Self-study Learning Instructor-ledTraining
Blended Learning
Combination of instructor-led and self-study learning
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
Multitenant Training
Copyright©2020 Oracleand/or its affiliates.
• Inside Database Administration training path
• Versions supported:19c, 18c and 1
2
c
• 4 days training
• Main topics: CDB basics, PDB Creation, Security, Upgrades
Methods, Backup&Duplicate,Storage, Data Movement…
• Multitenant environment available to run labs
Questions?
Thank you for your attention!
Copyright©2020 Oracleand/or its affiliates.
75
Copyright©2020 Oracleand/or its affiliates.
Contact Me
Laura Garcia Villarreal
OU PreSales Manager
April 2020
Laura.x.Garcia@oracle.com

More Related Content

Similar to 2-day-dba-oracle.pptx

OUGN winning performnace challenges in oracle Multitenant
OUGN   winning performnace challenges in oracle MultitenantOUGN   winning performnace challenges in oracle Multitenant
OUGN winning performnace challenges in oracle MultitenantPini Dibask
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insightsKirill Loifman
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitecturePini Dibask
 
Database Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantPini Dibask
 
Oem12c db12c and You
Oem12c db12c and YouOem12c db12c and You
Oem12c db12c and YouBobby Curtis
 
12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All EditionsFranck Pachot
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cMaris Elsins
 
Replication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionReplication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionBen Mildren
 
OEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 EditionOEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 EditionBobby Curtis
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi TenantRed Stack Tech
 
SOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20cSOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20cStefan Oehrli
 
Retour d'expérience d'un environnement base de données multitenant
Retour d'expérience d'un environnement base de données multitenantRetour d'expérience d'un environnement base de données multitenant
Retour d'expérience d'un environnement base de données multitenantSwiss Data Forum Swiss Data Forum
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cZohar Elkayam
 
Oracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureSinanPetrusToma
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...NomanKhalid56
 
6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloudLocuto Riorama
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
TechEvent 18c Multitenant New Features
TechEvent 18c Multitenant New FeaturesTechEvent 18c Multitenant New Features
TechEvent 18c Multitenant New FeaturesTrivadis
 

Similar to 2-day-dba-oracle.pptx (20)

OUGN winning performnace challenges in oracle Multitenant
OUGN   winning performnace challenges in oracle MultitenantOUGN   winning performnace challenges in oracle Multitenant
OUGN winning performnace challenges in oracle Multitenant
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
 
Database Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle Multitenant
 
Oem12c db12c and You
Oem12c db12c and YouOem12c db12c and You
Oem12c db12c and You
 
12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12c
 
Replication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionReplication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party Extinction
 
OEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 EditionOEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 Edition
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
 
SOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20cSOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20c
 
Retour d'expérience d'un environnement base de données multitenant
Retour d'expérience d'un environnement base de données multitenantRetour d'expérience d'un environnement base de données multitenant
Retour d'expérience d'un environnement base de données multitenant
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12c
 
Oracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud Infrastructure
 
Presentation day5 oracle12c
Presentation day5 oracle12cPresentation day5 oracle12c
Presentation day5 oracle12c
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
 
6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
TechEvent 18c Multitenant New Features
TechEvent 18c Multitenant New FeaturesTechEvent 18c Multitenant New Features
TechEvent 18c Multitenant New Features
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

2-day-dba-oracle.pptx

  • 1. Migration to the CDB Architecture 30-APR-2020 Mike Dietrich MasterProductManager DatabaseUpgradeand Migrations @MikeDietrichDE LauraGarcia Villareal OU PreSalesManager
  • 2. Mike Dietrich Master Product Manager Database Upgrade and Migrations https://MikeDietrichDE.com @MikeDietrichDE Copyright©2020 Oracleand/or its affiliates.
  • 4. Agenda AutoUpgrade and CDB Migration Oracle Multitenant Further Information 1 2 3 Copyright©2020 Oracleand/or its affiliates.
  • 5. AutoUpgrade The recommended wayto upgrade databases Photo by Joshua Sortino on Unsplash Copyright©2020 Oracleand/or its affiliates.
  • 6. Download | Get the latest autoupgrade.jar • MOSNote:2485457 . 1 Copyright©2020 Oracleand/or its affiliates.
  • 7. Upgrade | AutoUpgrade upg> Job Console 11.2.0.4 1 2 . 1 .0.2 1 2 .2.0. 1 18c autoupgrade.jar MOSNote:2485457 . 1 2MB config.cfg autoupgrade.jar 1 2 .2.0. 1 18.5.0 19c 19c Copyright©2020 Oracleand/or its affiliates.
  • 8. AutoUpgrade to Oracle 19c Migration to Oracle Multitenant Photo by Mathias Jensen on Unsplash Copyright©2020 Oracleand/or its affiliates.
  • 9. Oracle Multitenant | Oracle 19c • You don't have to use Oracle Single-/Multitenant with Oracle 19c • Oracle 18cand Oracle 19cbelong to the Oracle Database 12.2release family • For further details see MOSNote:742060. 1 Copyright©2020 Oracleand/or its affiliates.
  • 10. And by the way … • Since Oracle 19cyou can have 3user-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 Oracleand/or its affiliates.
  • 11. Upgrade to 19c | Migration to Multitenant Oracle 1 1 .2.04 CDB Oracle 1 9. 7 .0 PDB$ SEED CDB Oracle 1 9. 7 .0 PDB $ SEED 1 ⃣ AutoUpgrade 2⃣ Plug into CDB 3️ noncdb_to_pdb.sql Oracle 1 9. 7 .0 ⃣ Conversionwith AutoUpgrade One-Command Orchestration Copyright©2020 Oracleand/or its affiliates.
  • 12. 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 Oracleand/or its affiliates.
  • 13. Agenda AutoUpgrade and CDB Migration Oracle Multitenant Further Information 1 2 3 Copyright©2020 Oracleand/or its affiliates.
  • 14. Migration Copyright©2020 Oracleand/or its affiliates. Oracle Multitenant
  • 15. • Non-CDB • No change to previous releases Oracle Multitenant | Deployments 19c • No extra license • Available with SE2/ EE • Three user-created PDBsincluded • SPFILE:max_pdbs=3 • CDB:Three T enants • CDB:Multitenant • Multitenant license required • Available with EE only • Up to 252PDBs • Up to 4096 PDBs in the Cloud and on Engineered Systems PDB$ SEED PDB$ SEED Copyright©2020 Oracleand/or its affiliates. …
  • 16. Oracle Multitenant | Concept CDB2 PDB$ SEED CDB3 PDB$ SEED PDB$ S S E E E E D D CDB1 Copyright©2020 Oracleand/or its affiliates.
  • 17. Redo Control Flashback spfile PDB$ SEED Oracle Multitenant | Resource Sharing Copyright©2020 Oracleand/or its affiliates.
  • 18. 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 Oracleand/or its affiliates.
  • 19. Oracle Multitenant | Resource Manager • MAX_MBPS - maximum MB per second of I/O • Can't be setin the CDB$ROOT and on Exadata • Can be dynamically altered • CPU Consumption • CPU_COUNT - number of cpu cores • Memory Management • SGA_MIN_SIZE - minimum sga size • IOResource Managment [IORM] • MAX_IOPS - maximum I/O requests per second Can be set on Copyright©2020 Oracleand/or its affiliates. PDB level
  • 20. 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 Oracleand/or its affiliates.
  • 21. Oracle Multitenant | Components/Options • Only "Advanced Configuration" +"Custom Database" gives you: Be aware! Copyright©2020 Oracleand/or its affiliates. Be really aware!
  • 22. Oracle Multitenant | Components/Options • Remove or add options • https://mikedietrichde.com/2017/07/26/remove-clean-components- oracle-11-2-12-2/ Copyright©2020 Oracleand/or its affiliates.
  • 23. 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 Oracleand/or its affiliates.
  • 24. Oracle Multitenant | Local Undo • Default since Oracle 1 2 .2.0. 1 • Requirement for Flashback Pluggable Database,Hot Cloning and other features • InSTARTUP 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 Oracleand/or its affiliates.
  • 25. Oracle Multitenant | Creation of a PDB • Fast provisioning: • Admin user can be deleted afterwards • PDB is readyto use within seconds create pluggable database PDB1 admin user adm identified by pwd file_name_convert=('pdbseed',’pdb1'); CDB1 Copyright©2020 Oracleand/or its affiliates. PDB$ SEED
  • 26. • Local cloning: 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'); P P D D B B $ $ S S E E E E D D CDB1 • parallel can speed up the process • Default:cpu_count • Monitoring in v$session_longops • kpdbfCopyTaskCbk (datafile copy) • kcrfremnoc (redo file copy) PDB$ SEED CDB1 PDB$ SEED CDB2 Copyright©2020 Oracleand/or its affiliates.
  • 27. Oracle Multitenant | Hot Cloning insights DataFile2 DataFile1 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 DataFile2 Undo Redo Log 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 🗸 Legend Uncommitted block changed in interval Block changed in interval Committed in interval Uncommitted redo Undo written in interval Committed in interval 🗸 🗸 Copyright©2020 Oracleand/or its affiliates.
  • 28. 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'); CDB2 PDB$ SEED CDB1 Redo PDB$ SEED Redo Copyright©2020 Oracleand/or its affiliates.
  • 29. Oracle Multitenant | Upgrade and Plugin • Shutdown database • Plug into CDB • Sanityscript • https://mikedietrichde.com/2017/03/08/converting-an-12-1-non-cdb-and-plug-it-into-an-12-2-cdb/ • Upgrade non-CDB to CDB version • Startdatabaseread only • Create XML manifest file exec DBMS_PDB.DESCRIBE('PDB1.xml'); create pluggable database PDB1 using ('PDB1.xml') nocopy tempfile reuse; start ?/rdbms/admin/noncdb_to_pdb.sql PDB$ SEED PDB1 xml Read Only CDB1 noncdb_to_pdb.sql Copyright©2020 Oracleand/or its affiliates.
  • 30. Oracle Multitenant | noncdb_to_pdb.sql Copyright©2020 Oracleand/or its affiliates. • Sanity script when plugging in a stand-alone database • Irreversible • Runs only once in the life of a database • Rerunnable starting with 1 2 .2 • Runtime depends ... • See also: https://mikedietrichde.com/2017/06/08/noncdb_to_pdb-sql-take-long/
  • 31. Oracle Multitenant | Full Transportable Export/Import • Create a newPDB • 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 Tablespaces ReadOnly impdp Database Link Copyright©2020 Oracleand/or its affiliates.
  • 32. Oracle Multitenant | Upgrade Everything at once Unplug +Plug +Upgrade CDB1 CDB1 PDB$ SEED PDB$ S S E E E E D D CDB1 Copyright©2020 Oracleand/or its affiliates. CDB2 P PD DB B$ $ S S E E E E D D Upgrade Upgrade Upgrade Upgrade PD Up Bg $ rade SEED
  • 33. Oracle Multitenant | PDB Archive • Unplug the PDB including all files 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 • See also: https://mikedietrichde.com/2017/05/22/issue-with-pdb-archives-in-oracle-12-2-0-1-in-asm Copyright©2020 Oracleand/or its affiliates.
  • 34. 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 anystate preservation Copyright©2020 Oracleand/or its affiliates.
  • 35. Oracle Multitenant | CON_ID • Views: • USER_... • ALL_... • DBA_... • CDB_... - CDB_views have CON_ID column • Plus some very creative names:PDB_... • CON_ID • 0: • 1 : • 2: • 3-4096: Pertains to the entire database Object belongs to CDB$ROOT container Object belongs to PDB$SEED Set_exclude_seed_cdb_view=FALSE tosee PDB$SEED's objects Object belongs to PDB with this CON_ID Copyright©2020 Oracleand/or its affiliates.
  • 36. Oracle Multitenant | Character Sets • Since Oracle 1 2 .2.0. 1 : • Mix of different character sets is possible • CDB$ROOT must be AL32UTF8 to allow mixtures Photo by Erik Eastman on Unsplash Copyright©2020 Oracleand/or its affiliates.
  • 37. Oracle Multitenant | Flashback PDB Copyright©2020 Oracleand/or its affiliates. • 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;
  • 38. Multitenant | Silent Compatible Change • Be aware when you unplug/plug between different 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 Automatically Copyright©2020 Oracleand/or its affiliates. COMPATIBLE=12.2.0 COMPATIBLE=19.0.0 COMPATIBLE=19.0.0 CDB1 PDB$ SEED CDB2 PDB$ SEED
  • 39. Migration Strategies Migration to and Fallback with Oracle Multitenant Photo by Jackman Chiu on Unsplash Copyright©2020 Oracleand/or its affiliates.
  • 40. Move to Multitenant | High Level Overview Copyright©2020 Oracleand/or its affiliates. • 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 strategiesdon't work • Export/import with Data Pump necessary as fallback • Oracle GoldenGate can be used on top
  • 41. Move to Multitenant | Typical Pitfalls Copyright©2020 Oracleand/or its affiliates. • 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 • Standbyimplementation, especially in ASM • Performance monitoring,e.g.AWR
  • 42. 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 Oracleand/or its affiliates.
  • 43. Non-CDB to CDB | Migrate with any technique • Includes Data Pump, Transportable Tablespaces etc. Oracle 10.1.0.2 new PDB CDB Oracle 19.5.0 PDB$ SEED 1⃣ Provision 2⃣ Migrate Copyright©2020 Oracleand/or its affiliates.
  • 44. Move to Multitenant | TTS Migration Code Grants Trigger DATA TS Alter User Copy tablespace files DATA TS Source - non-CDB T arget - PDB Views S S e e t t t t a a b b l e l e s s p p a a c c e e s s r r e e a a d d-w - o r n i t l y e Rebuild logic ( E c o x p d o e r ,t v / i i e m w p s o ,rgtr at anbtsle,s r p o a l e c s e ,c s y o n n o t e n n y t m i n sfeotc) Views Code Grants Trigger CreaCtreeanteewUCsDerB/PDB PDB$ SEED PDB Copyright©2020 Oracleand/or its affiliates.
  • 45. Non-CDB to CDB | Data Pump with Dumpfile Oracle 11.2.0.4 new PDB CDB Oracle 19.3.0 PDB$ SEED 1⃣ Provision 2⃣ expdp DUMP FILE Copyright©2020 Oracleand/or its affiliates. DUMP FILE 3⃣ impdp
  • 46. Non-CDB to CDB | Data Pump over NETWORK_LINK Oracle 11.2.0.4 new PDB CDB Oracle 19.3.0 PDB$ SEED 1⃣ Provision 2 3 impdp with ⃣ NETWORK_LINK ⃣ Create DB Link Copyright©2020 Oracleand/or its affiliates.
  • 47. Non-CDB to CDB | Fallback: Data Pump w. dumpfile Oracle 11.2.0.4 Oracle 19.3.0 CDB PDB$ SEED 1⃣ 2 expdp with VERSION=11.2.0.4 DUMP FILE DUMP FILE Copyright©2020 Oracleand/or its affiliates. ⃣ impdp
  • 48. Non-CDB to CDB | Upgrade Oracle 11.2.0.4 AutoUpgrade to Oracle 19c 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 Oracleand/or its affiliates.
  • 49. Non-CDB to CDB | Upgrade - Fallback Oracle 11.2.0.4 AutoUpgrade to Oracle 19c 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 Flashback to GRP Copyright©2020 Oracleand/or its affiliates.
  • 50. Move to Multitenant | Fallback for upgrades? Copyright©2020 Oracleand/or its affiliates. • 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
  • 51. A typical example from the Real W orld Copyright©2020 Oracleand/or its affiliates. Migrating to Oracle Multitenant with a distant physical standby database in place
  • 52. Non-CDB to CDB with Standby | Initial Setup Oracle 12.1.0.2 PROD 10 TB size Oracle 12.1.0.2 STBDY 10 TB size 100 km distance Maximum Protection Copyright©2020 Oracleand/or its affiliates.
  • 53. Non-CDB to CDB with Standby | AutoUpgrade Oracle 19.7.0 PROD Oracle 12.1.0.2 STBDY Disable Broker - Defer Log Transport Oracle 12.1.0.2 PROD Copyright©2020 Oracleand/or its affiliates.
  • 54. Non-CDB to CDB with Standby | Upgrade Oracle 19.7.0 PROD Oracle 12.1.0.2 STBDY Oracle 19.7.0 PROD Enable Log Transport Enable Broker Copyright©2020 Oracleand/or its affiliates.
  • 55. Non-CDB to CDB with Standby | Upgrade Oracle 12.1.0.2 STBDY Oracle 19.7.0 PROD Oracle 19.7.0 STBDY Upgrade via Redo Apply Copyright©2020 Oracleand/or its affiliates.
  • 56. Non-CDB to CDB with Standby | Creation of CDB Oracle 19.7.0 PROD Oracle 19.7.0 STBDY CDB Oracle 19.7.0 PROD PDB$ SEED CDB Oracle 19.7.0 STBDY PDB$ SEED Copyright©2020 Oracleand/or its affiliates.
  • 57. Non-CDB to CDB with Standby | Conversion Oracle 19.7.0 Oracle 19.7.0 STBDY CDB Oracle 19.7.0 PROD PDB$ SEED CDB Oracle 19.7.0 STBDY PDB$ SEED PDB1 xml Read Only noncdb_to_pdb.sql (runtime varies) ASM PROD Alias List Execute in standby ASM instance Copyright©2020 Oracleand/or its affiliates. >> DOWNTIME <<
  • 58. Non-CDB to CDB with Standby | Plugin of STBY Oracle 19.7.0 PROD Oracle 19.7.0 STBDY CDB Oracle 19.7.0 PROD PDB$ SEED CDB Oracle 19.7.0 STBDY PDB$ SEED >> DOWNTIME << Copyright©2020 Oracleand/or its affiliates.
  • 59. Non-CDB to CDB with Standby | Plugin of STBY Copyright©2020 Oracleand/or its affiliates. • Read more … • Data Guard PM: http://www.stepi.net/2019/06/08/to-cdb-or-not-to-cdb-thats-the-question/ • MAA T eam: MOSNote:2273304. 1 Reusing the Source Standby Database Files When Plugging a non-CDB as a PDB into the Primary Database of a Data Guard Configuration
  • 60. Move to Multitenant | Summary Copyright©2020 Oracleand/or its affiliates. • Every migration is an architectural change • Every migration requires downtime • Incremental backup procedures can lower migration downtime • Oracle GoldenGate can help decreasing the downtime
  • 61. Agenda AutoUpgrade and CDB Migration Oracle Multitenant Further Information 1 2 3 Copyright©2020 Oracleand/or its affiliates.
  • 66. HOL | https://MikeDietrichDE.com Copyright©2020 Oracleand/or its affiliates.
  • 67. Questions? Thank you for your attention! Copyright©2020 Oracleand/or its affiliates.
  • 68. 68 Copyright©2020 Oracleand/or its affiliates. Oracle University Training Solutions Laura Garcia Villarreal OU PreSales Manager April 2020 Laura.x.Garcia@oracle.com
  • 69. Introducing Oracle University Learning Methods Oracle DatabaseMultitenant Training Copyright©2020 Oracleand/or its affiliates. Program Agenda
  • 70. Introducing Oracle University Copyright©2020 Oracleand/or its affiliates. Oracle University is the official provider of training and certification for Oracle technologies and products.
  • 71. Oracle University ProvidesTraining Options for Every Learner and Business Copyright©2020 Oracleand/or its affiliates. Training On Demand Recorded courses available via streaming for 90 days Learning Subscription Digital learning modules available via streaming for 1year ClassroomTraining Traditionalinstructor- led training Live Virtual Class Instructor-led courses via Internet Self-study Learning Instructor-ledTraining Blended Learning Combination of instructor-led and self-study learning
  • 72. 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
  • 73. Multitenant Training Copyright©2020 Oracleand/or its affiliates. • Inside Database Administration training path • Versions supported:19c, 18c and 1 2 c • 4 days training • Main topics: CDB basics, PDB Creation, Security, Upgrades Methods, Backup&Duplicate,Storage, Data Movement… • Multitenant environment available to run labs
  • 74. Questions? Thank you for your attention! Copyright©2020 Oracleand/or its affiliates.
  • 75. 75 Copyright©2020 Oracleand/or its affiliates. Contact Me Laura Garcia Villarreal OU PreSales Manager April 2020 Laura.x.Garcia@oracle.com