Skip to Main Content
  • Questions
  • Upgrade from non CDB to CDB - Oracle Metadata

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Zahir.

Asked: May 02, 2017 - 4:06 pm UTC

Last updated: May 04, 2017 - 1:23 am UTC

Version: 12.1.0.2

Viewed 1000+ times

You Asked

I have two scenarios for upgrade.

I have 12cR1 non CDB and 11g database .
What is the best way to upgrade these dbs into 2 pdbs in one 12c R2 CDB ( Same OS).

If I do a full import from a non CDB into a pdb , will not import all the extraneous objects from dictionary ( aka sys and system objects ) that are supposed to be for container ?
What is the better way to do this ?


Thanks

and Connor said...

You don't have to unload/reload the data. You can do it at the file level, for example:

1) make sure non-cdb is open in read only mode

2) unload metadata

exec dbms_pdb.describe(pdb_descr_file=>'/u01/new_pdb.xml');

3) shutdown the non-cdb so the files are closed

4) create pluggable in the normal way

create pluggable database pdb6 using '/u01/new_pdb.xml' copy
file_name_convert = ('oldspec', 'newspec');

5) Run a cleanup to get rid of non-cdb items in the new pluggable

@$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Zahir M, May 03, 2017 - 1:35 pm UTC

Thanks very much Connor.

Will step 2 ( aka dbms_pdb.describe) will work will 11g as well ?
Connor McDonald
May 04, 2017 - 1:23 am UTC

To my knowledge no. The options are basically:

1) upgrade it to 12.1 or higher first, and then plug it in
2) datapump export/import


More to Explore

Multitenant

Need more information on Multitenant? Check out the Multitenant docs for the Oracle Database