database:oracle:pluggable-database
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| database:oracle:pluggable-database [2019/01/09 10:31] – created odefta | database:oracle:pluggable-database [2023/07/04 16:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Auto start a pluggable database when Oracle starts ===== | ===== Auto start a pluggable database when Oracle starts ===== | ||
| - | | + | < |
| - | export PATH=$PATH: | + | export ORACLE_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: |
| + | export ORACLE_SID=GDB_SID - SID of the global database name to connect to the main database - CDB (not pluggable - PDB) | ||
| - | | + | sqlplus / as sysdba |
| + | </ | ||
| Next, to open a single PDB: | Next, to open a single PDB: | ||
| - | | + | <code sql> |
| + | alter pluggable database PDB_NAME open; | ||
| + | </ | ||
| To open all PDBs: | To open all PDBs: | ||
| - | | + | <code sql> |
| + | alter pluggable database all open; | ||
| + | </ | ||
| 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: | ||
| - | | + | <code sql> |
| + | alter pluggable database PDB_NAME save state; | ||
| + | </ | ||
| For more PDBs: | For more PDBs: | ||
| - | | + | <code sql> |
| + | alter pluggable database all except PDB_NAME1, PDB_NAME2 save state; | ||
| + | </ | ||
| For all PDBs: | For all PDBs: | ||
| - | | + | <code sql> |
| + | alter pluggable database all save state; | ||
| + | </ | ||
| + | |||
| + | ===== Show all pluggable databases status ===== | ||
| + | <code sql> | ||
| + | |||
| + | col NAME for a10 | ||
| + | select name, open_mode from v$pdbs; | ||
| + | |||
| + | NAME | ||
| + | ---------- ---------- | ||
| + | PDB$SEED | ||
| + | FLPDB READ WRITE | ||
| + | |||
| + | </ | ||
database/oracle/pluggable-database.1547029906.txt.gz · Last modified: (external edit)
