ORA-65086: cannot open/close the pluggable database
November 22, 2021 Leave a comment
Problem:
Tried to open the pluggable database and got the error:
SQL> alter pluggable database PDB11 open; alter pluggable database PDB11 open * ERROR at line 1: ORA-65086: cannot open/close the pluggable database
Reason:
I have run unplug database before so database status was UNPLUGGED.
SQL> col PDB_NAME for a15 SQL> set linesize 800 SQL> select pdb_name,status from dba_pdbs; PDB_NAME STATUS --------------- ---------- PDB11 UNPLUGGED PDB$SEED NORMAL PDB12 NORMAL PDB13 NORMAL
Solution:
To plug the database back to the container with the same name, first you need to drop it:
SQL> drop pluggable database PDB11 keep datafiles;
SQL> create pluggable database PDB11 using '/u01/app/oracle/myxml/PDB11.xml' nocopy tempfile reuse;
Check the status again:
SQL> col PDB_NAME for a15 SQL> set linesize 800 SQL> select pdb_name,status from dba_pdbs; PDB_NAME STATUS --------------- ---------- PDB$SEED NORMAL PDB12 NORMAL PDB13 NORMAL PDB11 NEW
Open the database and make sure status became NORMAL:
SQL> alter pluggable database PDB11 open; SQL> select pdb_name,status from dba_pdbs; --------------- ---------- PDB$SEED NORMAL PDB12 NORMAL PDB13 NORMAL PDB11 NORMAL