11g to 12c

The simplest way to migrate Oracle database 11g to pluggable database 12c

Hello guys

I had many questions from my clients regarding ‘what is the simplest way to migrate Oracle database 11g to Pluggable database 12c’. I should say that this article is focused on the simplest way, not necessarily the best way or the lowest-cost way. so keep reading to show you within a scenario.

Existing setup:

migrate Oracle database 11g to pluggable database 12c:

  • In the source host and database(11g):

Let’s assume the business needs all objects belonging to the schema ‘mas11g’ and we have to move them to our new PDB on Oracle 12c. In the first step we’ll create the schema and some objects within it:

Then we make a logical backup with the expdp command:

Notice to the schemas switch in the expdp command, we use it to bring all objects belonging to that schema in our logical backup. For the final step on our source host, we copy the dump file to the destination host

  • In the destination host and the database(12c):

First, let’s take a look at the current setting of our 12c database:

As shown in the top codes, there is one open PDB(mypdb) in our production database, which is used for another business. We intend to create new PDB for our concerned old version database and we’ve decided to NOT using OMF:

As you see in the previous codes, we’ve created a PDB named mas12c and it is ready to use. In my opinion, one of the best ways to connect to PDBs is using TNS. we are going to create a TNS for mas12c PDB to connect to the PDB trough it:

Well, we are now ready to import our dump to the mas12c PDB. First, we have to create or choose a directory for the IMPDP command to use. It’s worth mentioning there is a Globally Unique immutable ID (GUID) assigned to the PDBs in the creation time which OMF and default data pumps directory use it.

We would like to use default directory “DATA_PUMP_DIR” and it’s enough to make sure directory exist:

Now let’s do import:

So far so good, it’s time to do some verifications:

OK, it seems it’s done and our migration has completed successfully.

Thanks for your attention.

3 comments On The simplest way to migrate Oracle database 11g to pluggable database 12c

Leave a reply:

Your email address will not be published.

Captcha loading...