User Tools

Site Tools


database:oracle:pluggable-database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
database:oracle:pluggable-database [2019/01/09 12:31] – created odeftadatabase:oracle:pluggable-database [2019/01/09 12:48] odefta
Line 3: Line 3:
 ===== Auto start a pluggable database when Oracle starts ===== ===== Auto start a pluggable database when Oracle starts =====
  
-  export ORACLE_HOME=/path/to/db_home +<code> 
-  export PATH=$PATH:$ORACLE_HOME/bin +export ORACLE_HOME=/path/to/db_home 
-  export ORACLE_SID=GDB_SID - SID of the global database name to connect to the main database - CDB (not pluggable - PDB)+export PATH=$PATH:$ORACLE_HOME/bin 
 +export ORACLE_SID=GDB_SID - SID of the global database name to connect to the main database - CDB (not pluggable - PDB)
  
-  sqlplus / as sysdba+sqlplus / as sysdba 
 +</code>
  
 Next, to open a single PDB: Next, to open a single PDB:
  
-  alter pluggable database PDB_NAME open;+<code sql> 
 +alter pluggable database PDB_NAME open; 
 +</code>
  
 To open all PDBs: To open all PDBs:
  
-  alter pluggable database all open;+<code sql> 
 +alter pluggable database all open; 
 +</code>
  
 To keep the PDBs opened after Oracle restart, we need to save their actual opened state: To keep the PDBs opened after Oracle restart, we need to save their actual opened state:
Line 21: Line 27:
 For just one PDB: For just one PDB:
  
-  alter pluggable database PDB_NAME save state;+<code sql> 
 +alter pluggable database PDB_NAME save state; 
 +</code>
  
 For more PDBs: For more PDBs:
  
-  alter pluggable database all except PDB_NAME1, PDB_NAME2 save state;+<code sql> 
 +alter pluggable database all except PDB_NAME1, PDB_NAME2 save state; 
 +</code>
  
 For all PDBs: For all PDBs:
  
-  alter pluggable database all save state;+<code sql> 
 +alter pluggable database all save state; 
 +</code> 
 +   
 +===== Show all pluggable databases status =====
  
 +<code sql>
 +
 +col NAME for a10
 +select name, open_mode from v$pdbs;
 +
 +NAME       OPEN_MODE
 +---------- ----------
 +PDB$SEED   READ ONLY
 +FLPDB      READ WRITE
 +
 +</code>
database/oracle/pluggable-database.txt · Last modified: 2023/07/04 19:36 by 127.0.0.1