Check the Status of the Non-Container Database:
SELECT INSTANCE_NAME, STATUS FROM V$INSTANCE;
Check the Status of the Container Database (CDB)
Run the following query to check the status of the CDB:
SELECT INSTANCE_NAME, STATUS FROM V$INSTANCE
Check the Status of All PDBs
Run this query to see the status of all PDBs:
SELECT NAME, OPEN_MODE, RESTRICTED FROM V$PDBS;
Check the Status of a Specific PDB
If you want to check the status of a specific PDB, use:
SELECT NAME, OPEN_MODE, RESTRICTED FROM V$PDBS WHERE NAME = 'your_pdb_name';
Open or Close a PDB
To open a PDB:
ALTER PLUGGABLE DATABASE your_pdb_name OPEN;
To close a PDB:
ALTER PLUGGABLE DATABASE your_pdb_name CLOSE;