ORA-16433: The database or pluggable database must be opened in read/write mode

ORA-16433: The database or pluggable database must be opened in read/write mode

Error
Oracle 12c version with PDBS database, Snapshot Standby Will not Convert to Physical Standby
While troubleshooting a tempfile issue, I convert the database to a snapshot standby.
When I attempted to covert the database back to physical standby, I recieved the following error:

alter database convert to physical standby;
*
ERROR at line 1:
ORA-16433: The database or pluggable database must be opened in read/write mode.

On checking pluggable database is currently mounted.

SYS@DBSERVER 07-NOV-18> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED MOUNTED
3 CFGPDB1 MOUNTED

Solution
For converting the Snapshot Standby Database to Physical Standby Database. Database Should be in open state.

1) Open the Container database:
alter database open ;

2) Open all pluggable database:
alter pluggable database all open;

3) Check all pdbs are open in read write state:

show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 CFGPDB1 READ WRITE NO

4) Check the CDB DATABASE ROLE

select name, db_unique_name, database_role, open_mode from v$database;

NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- --------------------
SVCFG1 svcfg1rmt SNAPSHOT STANDBY READ WRITE

Note: It is in snapshot standby role with READ/WRITE mode, then you should now be able to convert it back to physical standby.

5) Shutdown the Database.

SQL> SHUTDOWN IMMEDIATE; 

6) Mount the Database

SQL> STARTUP MOUNT; 

7) Convert Snapshot Standby to Physical Standby

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY; 

8) Shutdown the Database

SQL> SHUTDOWN IMMEDIATE; 

9) Startup in Nomount mode

SQL> STARTUP NOMOUNT; 

10) Mount the Physical Standby Database

SQL> ALTER DATABASE MOUNT STANDBY DATABASE; 

--Verify
select open_mode,database_role from v$database;
OPEN_MODE DATABASE_ROLE
---------- ----------------
MOUNTED PHYSICAL STANDBY

11) Start Redo Log Apply

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE; 

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.