This error indicates that there's something stopping you from opening a pluggable database. Mostly it happens when you have already unplugged your PDB which you are trying to open.
It can happen if someone else has done it but you are not aware of it. To verify the same, you can use the below query to see if this is the case for you.
Error:
SQL> alter pluggable database pdb3 open; alter pluggable database pdb3 open * ERROR at line 1: ORA-65086: cannot open/close the pluggable database
Fix:
Ensure you are connected to ROOT container,
SQL> show con_name; CON_NAME ------------------------------ CDB$ROOT
If not, you can run,
SQL> alter session set container = CDB$ROOT; Session altered.
Run the below query to see the status of PDB you are trying to open, whether it's unplugged or not.
SQL> select pdb_name, status, unplug_scn from dba_pdbs; PDB_NAME STATUS UNPLUG_SCN ------------------------------ ---------- ---------- PDB1 NORMAL 1974494 PDB$SEED NORMAL 1924429 PDB2 NORMAL 2223416 PDB3 UNPLUGGED 2267397 PDB4 UNPLUGGED 2269040
An Unplugged database needs to be dropped first, then can be remapped to the previous CDB or a new CDB. You must have the PDB archive or XML Metadata and datafiles copy to do this.
If you have what's needed to be plugged again, proceed with dropping the unplugged PDBs.
SQL> drop pluggable database pdb3 including datafiles; Pluggable database dropped. SQL> drop pluggable database pdb4 including datafiles; Pluggable database dropped.
I hope this helps !!
No comments:
Post a Comment