Oracle Multitenant Migration
Multitenant Support
What does this mean?
1. Oracle Database 19c is the last release to support non-CDB architecture
2. Before upgrade to Oracle Database 21c or beyond,
you must convert to the mulititenant architecture .
MUTLITENANT MIGRATION
CDB | Components
CDB$ROOT must be a superset of all PDBs
Recommendation
1. Install as many components as required
2. But no more than that
Number of components have big effect on upgrade duration
Components (e.g., JAVAVM) may require patch regular activity
• Always use default of a given version
• Example 19.0.0
• Always use three digits only
• Should you change COMPATIBLE after applying a Release Update?
• Example 19.10
• Never
Plug In | Compatibility Check
1. In source, generate manifest file
SQL> exec dbms_pdb.describe('/tmp/DB19.xml');
2. In CDB, check compatibility
set serveroutput on
BEGIN
IF dbms_pdb.check_plug_compatibility('/tmp/DB19.xml') THEN
dbms_output.put_line('PDB compatible? ==> Yes');
ELSE
dbms_output.put_line('PDB compatible? ==> No');
END IF;
END;
/
3. Always check the details
SQL> select type, message
from PDB_PLUG_IN_VIOLATIONS
where name='DB19' and status<>'RESOLVED';
TYPE MESSAGE
___________________________________________________________________________________
ERROR '19.9.0.0.0 Release_Update' is installed in the CDB but no release updates are installed in the PDB
ERROR DBRU bundle patch 201020: Not installed in the CDB but installed in the PDB
ERROR PDB's version does not match CDB's version: PDB's version 12.2.0.1.0. CDB's version 19.0.0.0.0.
WARNING CDB parameter compatible mismatch: Previous '12.2.0' Current '19.0.0'
WARNING PDB plugged in is a non-CDB, requires noncdb_to_pdb.sql be run.
Plug In | Create PDB
1. Restart database in read-only mode
2. Generate manifest file and shut down
3. In CDB, create PDB from manifest file
SQL> shutdown immediate
SQL> startup mount
SQL> alter database open read only;
SQL> exec dbms_pdb.describe('/tmp/DB19.xml');
SQL> shutdown immediate;
SQL> create pluggable database DB19
using '/tmp/DB19.xml' nocopy tempfile reuse;
Convert | Create PDB
1. Open PDB
2. Convert and restart
3. Restart PDB
4. Check plug-in violations
5. Purge
6. Ensure PDB is open READ WRITE and unrestricted
7. Configure PDB to auto-start
SQL> alter pluggable database DB19 open;
SQL> alter session set container=DB19;
SQL> @?/rdbms/admin/noncdb_to_pdb.sql
SQL> alter pluggable database DB19 close;
SQL> alter pluggable database DB19 open;
SQL> select type, message from pdb_plug_in_violations
where name='DB19' and status<>'RESOLVED';
SQL> select open_mode, restricted from v$pdbs;
SQL> alter pluggable database DB19 save state;
Convert | noncdb_to_pdb.sql
Requires downtime
• Runtime varies - typically 10-30 min
• Fix for Bug 25809128 is included since 19.9.0 and adds a significant improvement
• Runs only once in the life of a database
• Irreversible
• Re-runnable from 12.2
Fallback| PDB Downgrade
Downgrade works for CDB/PDB entirely as well as for single/multiple PDBs
• Manual tasks
• catdwgrd.sql in current (after upgrade) environment
• catrelod.sql in previous (before upgrade) environment
• Don't change COMPATIBLE
• datapatch must roll back SPUs/PSUs/BPs manually
MOS Note: 2172185.1
How to Downgrade a Single Pluggable Oracle Database ( PDB ) to previous release
Migration | Last Words
Every migration
• Is an architectural change
• Requires downtime
• Requires a fallback
• Ends with a backup
How to migrate a non pluggable database
that uses TDE to pluggable database ?
(Doc ID 1678525.1)
Data Guard | Migration Options
It is possible to preserve the standby database
when you migrate from non-CDB to PDB
Special attention is needed
You don't have to rebuild your standby database but you might find it is the easiest solution.
Follow Doc - Multitenant Migration
No comments:
Post a Comment