Blog

Unplugging and Plugging Oracle PDB from One Container to Another

To Unplug and Plug in the Pluggable Database database (PDB) from One Container Database (CDB)to another Container Database (CDB), the primary thing is we should be connected to the root CDB and to the PDB.

 

There are also some considerations to be taken care of when Unplugging and Plugging the PDB from one CDB to another CDB.

The Endianness of the CDB should be same.

The Options of the CDB installed should be same.

The source CDB and the target CDB must have compatible character sets and national character sets.

Before unplugged

Unplug PDB from Source CDB

Run dbca command. Select Manage Pluggable Database

Select Unplug a Pluggable database then click the next button Select

Select the container database which pluggable database we need to unplug and click the next button

We need to select the Pluggable database name from the drop-down box and then click the next button

It will show the unpluggable database details

Next click finish it will open up the progress page 

Pluggable database successfully unplugged click close

After plugged

Transfer file to 19c CDB Server

Now transfer database file set from source to target using SCP or WINSCP. PDB database file sets

/u01/app/oracle/product/19c/dbhome/assistants/dbca/templates/{DB_UNIQUE_NAME}_{PDB_NAME}.dfb

/u01/app/oracle/product/19c/dbhome/assistants/dbca/templates/{DB_UNIQUE_NAME}_{PDB_NAME}.xml

Plug the PDB into 19c target CDB

 

Run dbca command from 19c CDB. Choose the Manage Pluggable Databases option in it then click the next button

Select Create a Pluggable database Choose

Choose the container database on which we are planning to plug the PDBDBA, we have only 1 container so we will click NEXT to proceed

Select Create Pluggable database from an unplugged PDB and select the transferred database file set from the SCP location and click NEXT

We need to provide the required Pluggable Database name then click the next button. If required we can lock all other PDB users and can create a new administrator option too

It will automatically choose the storage type and location if exists already

Click finish

Progress page 

Click close pdb plugged successfully

You could see the Pluggable Database PLUGPDB is in READ WRITE mode.

Hope it Helps!!!

Follow me

Contact us for Training/ Job Support

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.