In this part of the Hands-On Lab you will now plugin UPGR into CDB2. CDB2 is a Multitenant Container database. And UPGR will be converted into a PDB and become a pluggable database.
Switch to the UPGR database in 18c environment:
Shutdown UPGR and start it up read only:
Create the XML manifest file describing UPGR’s layout and information:
Switch to CDB2:
SKIP THIS STEP PLEASE ==> Goto 3. Plugin Operation
There’s a bug in Oracle 18.2.0 at the moment leading to an ORA-3113.
Ideally you do a compatibility check before you plugin finding out about potential issues. This step is not mandatory but recommended. The check will give you
set serveroutput on DECLARE compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY( pdb_descr_file => '/home/oracle/pdb1.xml', pdb_name => 'PDB1') WHEN TRUE THEN 'YES' ELSE 'NO' END; BEGIN DBMS_OUTPUT.PUT_LINE('Is the future PDB compatible?' || compatible); END; /
Plugin UPGR with its new name PDB1 – from this point there’s no
UPGR database anymore. In a real world environment, you would have a backup or use a backup/copy to plug in. In our lab the database
UPGR will stay in place and become PDB1 as part of CDB2.
Please use the proposed naming as the
FILE_NAME_CONVERT parameter and TNS setup have been done already.
NOCOPY option for this lab to avoid additional copy time and disk space consumption. The
show pdbs command will display you all existing PDBs in this CDB2.
As you couldn’t do a compatibility check beforehand, you’ll open the PDB now and you will recognize that it opens only with errors.
Find out what the issue is:
As you can see, a lot of the reported issues aren’t really issues. This is a known issue. Only in the case you see
ERROR in the first column you need to solve it.
The only real
PDB plugged in is a non-CDB, requires noncdb_to_pdb.sql be run.
Kick off this sanity script to adjust
UPGR and make it a “real” pluggable database
noncdb_to_pdb.sql. Runtime will be between 10-20 minutes. Take a break while it is running. The recompilation takes quite a bit.
Startup PDB1 and SAVE STATE. This ensures, that PDB1 will be opened automatically whenever you restart CDB2:
Try to connect directly to PDB1 – notice that you can’t just connect without specifying the service name as PDB1 is not visible on the OS level.
As alternative you could also use the EZconnect (speak: Easy Connect)
===> NEXT: Migrate FTEX