While converting a non-CDB database to a PDB database, sometimes I was able to this, but sometimes I was facing the following error.
################################
SQL> create pluggable database pdb2 using '/u01/oracle/noncdb.xml';
create pluggable database pdb2 using '/u01/oracle/noncdb.xml'
*
ERROR at line 1:
ORA-65139: Mismatch between XML metadata file and data file
+DATA/NONCDB/DATAFILE/system.279.868463067 for value of fcpsb (1618349 in the
plug XML file, 1619859 in the data file)
################################
After a long of investigation, I realized that I need to strictly follow the proper steps to convert a non-CDB database to a PDB database. Steps are as follows
- Shutdown non-cdb database
- Startup non-cdb in read-only mode
- Execute DBMS_PDB.DESCRIBE to describe the non-cdb database in .xml file
- Connect to CDB and create PDB out using xml file created above
- Execute noncdb_to_pdb.sql script
- If you don’t start non-CDB database in read-only mode while describing it in the xml file, you will face this error; while creating the PDB using this xml file.
- After you described the non-CDB database in the xml file, you SHOULD NOT open the non-CDB database until you are finished executing your “CREATE PLUGGABLE DATABASE” command using this xml file, to create your PDB.
没有评论:
发表评论