Description:-
How to Startup And Shutdown The Oracle Pluggable Database
Startup Oracle PDB Database:-
Method:-1 From PDB database level
SQL> alter session set container=ORCLPDB;
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
3 ORCLPDB MOUNTED
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- ——————– ———-
3 ORCLPDB MOUNTED
SQL> startup
Pluggable Database opened.
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- ——————– ———-
3 ORCLPDB READ WRITE
OR
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- ——————– ———-
3 ORCLPDB MOUNTED
SQL> alter pluggable database ORCLPDB open;
Pluggable database altered.
SQL> alter pluggable database ORCLPDB save state;
Pluggable database altered.
Method:-2 From Container Database Level
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 ORCLPDB MOUNTED
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- ——————– ———-
2 PDB$SEED READ ONLY
3 ORCLPDB MOUNTED
SQL> alter pluggable database ORCLPDB open;
Pluggable database altered.
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- ——————– ———-
2 PDB$SEED READ ONLY
3 ORCLPDB READ WRITE
PDB startup commands:-
alter pluggable database orclpdb open; (read write)
alter pluggable database orclpdb open instances=all; (Rac PDB)
alter pluggable database orclpdb open upgrade;
alter pluggable database orclpdb open force;
alter pluggable database orclpdb open restricted;
Pdb open when Automatically CDB Restarts
SQL> alter pluggable database ORCLPDB save state;
Pluggable database altered.
col CON_NAME for a20
col INSTANCE_NAME for a20
SQL> select con_name,instance_name,state from dba_PDB_saved_states;
CON_NAME INSTANCE_NAME STATE
——————– ——————– ————–
ORCLPDB orcl OPEN
Shutdown Oracle PDB Database:-
set lines 100 pages 100
col name for a20
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- ——————– ———-
2 PDB$SEED READ ONLY
3 ORCLPDB READ WRITE
Method:-1 (Login in to correct pdb and give shutdown command )
SQL> alter session set container=ORCLPDB;
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
3 ORCLPDB READ WRITE NO
SQL> shut immediate
Pluggable Database closed.
Method:-2 From Container Database Level
SQL> conn / as sysdba
Connected.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 ORCLPDB READ WRITE NO
SQL> alter pluggable database orclpdb close immediate;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 ORCLPDB MOUNTED
Method:-3 From PDB Database Level
SQL> alter session set container=ORCLPDB;
Session altered.
SQL> alter pluggable database orclpdb close immediate;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
3 ORCLPDB MOUNTED
Oracle Rac PDB Database shutdown
alter pluggable database orclpdb close immediate instances=all;
Connect with me:-
Telegram App:https://t.me/oracledbwr
LinkedIn:https://www.linkedin.com/in/hariprasathdba
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/oracledbwr