Sunday, June 25, 2023

ORA-16000: database or pluggable database open for read-only access

 I faced this error message when I tried to drop a table from my PDB which was opened in read-write mode without any restriction.

SQL> drop table test;
drop table test
           *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-16000: database or pluggable database open for read-only access
 
 SQL> show pdbs
 
CON_ID    CON_NAME         OPEN MODE        RESTRICTED
---------- ------------------------------ ---------- ---------------------------
 3                PDB1                      READ WRITE      NO

Upon investigation I found that a PDB clone command was initiated in he root container in order to create a duplicate of this PDB. In 12.1, hot conning is no possible as this feature is available only in versions 12.2 and above. For 12.1, the PDB must be opened in read-only mode if we want to clone the PDB. If users are executing transaction and you initiate clone process, ORA-65342 is returned. If there is no active transaction when clone command was executed, the PDB is implicitly shifted to read-only mode and new transactions are returned ORA-16000 error.

No comments:

Post a Comment

Popular Posts - All Times