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

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

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

Tried to create the pluggable database then i am getting the following the error:

CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1
FILE_NAME_CONVERT=('D:\ORACLE\18.0.0\ORADATA\XE\PDBSEED\','D:\ORACLE\18.0.0\ORADATA\XE\PDB2\');
CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1
*
ERROR at line 1:
ORA-16000: database or pluggable database open for read-only access

Solution

1. Check the con_id of the session where you tried to execute the following create PDB command.

SQL> show con_id
CON_ID
--------------------
2

2. If its CDB$ROOT container then it must be value 1. If it is in another container you have to switch the container.

SQL> alter session set container=CDB$ROOT;
Session altered.


SQL> show con_id
CON_ID
------------------------------
1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.