Save state of Pluggable database in Oracle

 

Pluggable Database Saved State in Oracle

Saved State is a feature in Oracle for saved the OPEN state of all PDBS when CDB is restart. It will bring PDBs to same state if it open then it bring the PDB in Open State or if PDB is closed when CDB restart then it bring PDB in closed state. Open the database in READ-WRITE/READ-ONLY mode it save state.

Check the Save State for PDBS

select a.name,b.state from v$pdbs a , dba_pdb_saved_states b where a.con_id = b.con_id;

SELECT con_name, instance_name, state FROM cdb_pdb_saved_states;

When database gets unplug and plug this saved state will be lost.

Save the existing State of PDB

alter pluggable database PDB1 save state;
Pluggable database altered.

Discard or unsaved the existing state of PDB

alter pluggable database HYDB discard state;
Pluggable database altered.

Show the pdbs

Show pdbs

Preserving the Open Mode of All PDBs

ALTER PLUGGABLE DATABASE ALL SAVE STATE;

Preserving the Open Mode of Multiple PDBs

ALTER PLUGGABLE DATABASE PDB1 , PDB2 SAVE STATE;

Preserving the Open Mode of All PDBs Except

ALTER PLUGGABLE DATABASE ALL EXCEPT PDB3, PDB4 SAVE STATE;

SQL> alter pluggable database PDB open read write instances=all;


Pluggable database altered.


SQL> show pdbs;


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         3 PDB                            READ WRITE NO

SQL> alter pluggable database pdb save state;


Pluggable database altered.

Comments

Popular posts from this blog

How to drop index and before dropping it how to get the DDL.

PRVG-11250 : The check "RPM Package Manager database" was not performed because

ORA-00257:archiver error, connect internal only until freed

Verifying Daemon “Avahi-Daemon” Not Configured And Running …FAILED (PRVG-1360)

Linux OL7/RHEL7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm

SKIP DNS RESLOV.CONF CHECK DURING RAC CONFIGURATION

CPU Patch Analysis

How to write to a CSV file using Oracle SQL*Plus

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How To Manage Space of The FRA in the Oracle DB