In these posts, we will see how we can unplug the application container and plug it into different CDB.
Step 1: Unplug application container.
SQL> alter pluggable database app_pdb unplug into '/u02/app_pdb.xml'; alter pluggable database app_pdb unplug into '/u02/app_pdb.xml' * ERROR at line 1: ORA-65025: Pluggable database APP_PDB is not closed on all instances.
It shows error ORA-65025: Pluggable database APP_PDB is not closed on all instances.
Note: All application pdb must be unplugged prior to unplugging operation of application container.
Now let us see how many application pdbs we have in app_pdb application container and status of pdb.
Step 2: Change container to app_pdb.
SQL> alter session set container=app_pdb; Session altered.
Step 3: Show pdbs :
SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 4 APP_PDB READ ONLY NO 5 APP_SAL READ ONLY NO 8 ORAPDB1 MOUNTED
We can see here app_pdb have two application pdbs app_sal and orapdb1.
Step 4: Let’s unplug them first.
SQL> alter pluggable database app_sal close immediate; Pluggable database altered. SQL> alter pluggable database app_sal unplug into '/u02/app_sal.xml'; Pluggable database altered.
SQL> alter pluggable database orapdb1 unplug into '/u02/orapdb1.xml'; Pluggable database altered.
Step 5: Now let us unplug application container app_pdb :
SQL> alter pluggable database app_pdb unplug into '/u02/app_pdb.xml'; Pluggable database altered.
Step 6: Connect to cdb where you want to plug application container :
Step 7: Create a pluggable database using the .xml file and give as application container clause :
SQL> create pluggable database app_pdb as application container using '/u02/app_pdb.xml'; Pluggable database created.
Step 8: Open application container :
SQL> alter pluggable database app_pdb open; Pluggable database altered.
Step 9: Check from v$pdbs view :
SQL> select name,open_mode,application_root from v$pdbs; NAME OPEN_MODE APP -------------------------------------------------------------------------------------------------------------------------------- ---------- --- PDB$SEED READ ONLY NO DB MOUNTED NO APP_PDB READ WRITE YES
After plugging application container we can plug application pdb inside application container.
Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us an Invitation or Follow us:
Telegram Channel: https://t.me/helporacle
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
Joel Perez’s LinkedIn: Joel Perez’s Profile
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp