sql> show pdbs;
con_id con_name open mode restricted
---------- ------------------------------ ---------- ----------
2 pdb$seed read only no
3 pdb mounted
sql> alter pluggable database all save state instances = all;
pluggable database altered.
sql> alter pluggable database all open instances = all;
pluggable database altered.
sql> show pdbs;
con_id con_name open mode restricted
---------- ------------------------------ ---------- ----------
2 pdb$seed read only no
3 pdb read write no
sql> alter pluggable database all save state instances = all;
pluggable database altered.
SQL> alter session set container=pdb;
Session altered.
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 PDB READ WRITE NO
SQL> show con_name;
CON_NAME
------------------------------
PDB
=================
Customer has a 2 node RAC Container database. He is trying to close a PDB on all the instances using following command:
alter pluggable database PDB1 close instances=ALL;
As per the documentation, it should close PDB on all the instances, but it only closing the PDB on local instance and not on remote instance.
CAUSE
Customer had parallel_force_local=true, so a parallel slave was not spawned to close the remote PDB.
SOLUTION
alter system set parallel_force_local=false;
alter pluggable database PDB1 close immediate instances=all ;
SQL> show parameter local;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.52.183)(PORT=1521))
parallel_force_local boolean FALSE