Database Reference
In-Depth Information
exeRCiSe 13.2
(continued)
compatible CONSTANT VARCHAR2(3) :=
CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(
pdb_descr_file => 'c:\temp\oracle\pdb2.xml',
pdb_name='PDB1')
WHEN TRUE THEN 'YES'
ELSE 'NO'
END;
BEGIN
DBMS_OUTPUT.PUT_LINE(compatible);
END;
/
If the PDB is compatible, then the output will be
YES
; if it is not compatible, the out-
put will be
NO
and you can query
SYS.PDB_PLUG_IN_VIOLATIONS
to learn why it is
incompatible.
8.
Start up the source PDB in read-only mode, and create an XML file that describes
the PDB.
BEGIN
DBMS_PDB.DESCRIBE(
pdb_descr_file => 'c:\temp\oracle\pdb1.xml');
END;
/
9.
Create the target PDB with the
CREATE PLUGGABLE DATABASE
statement specifying
the XML file in the
USING
clause.
CREATE PLUGGABLE DATABASE pdb2 AS CLONE USING 'pdb1.xml' NOCOPY;
10.
Connect to the new PDB as user
SYS
as SYSDBA.
CONNECT SYS@pdb2 AS SYSDBA
11.
Run
noncdb_to_pdb.sql
within SQL*Plus.
@$ORACLE_HOME\rdbms\admin\noncdb_to_pdb.sql
12.
Open
PDB2
in a read-write restricted mode.
ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE RESTRICTED;
13.
Synchronize the PDB:
EXECUTE DBMS_PDB.SYNC_PDB;
Search WWH ::
Custom Search