PDB Start Automatically:
In oracle 12c , On startup of the CDB, the PDBS will be in MOUNTED and need to open all pdb manually:
To open pdb:
alter pluggable database <pdb name> open;
As of PSU 12.1.0.2, Oracle introduced “PDB State Management Across CDB Restart”, which will automatically put all pluggable database in a previously defined state on database startup.
Query to check current saved state of the PDBs:
SQL> SELECT con_name, instance_name, state FROM cdb_pdb_saved_states;
Command to save the states:
alter pluggable database <pdb name> save state;
To discard the saved state:
alter pluggable database <pdb name> discard state;
We can also create trigger in the CDB to automatically open the pluggable on startup:
CREATE TRIGGER open_all_pdbs
AFTER STARTUP ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';
END open_all_pdbs;
/
In oracle 12c , On startup of the CDB, the PDBS will be in MOUNTED and need to open all pdb manually:
To open pdb:
alter pluggable database <pdb name> open;
As of PSU 12.1.0.2, Oracle introduced “PDB State Management Across CDB Restart”, which will automatically put all pluggable database in a previously defined state on database startup.
Query to check current saved state of the PDBs:
SQL> SELECT con_name, instance_name, state FROM cdb_pdb_saved_states;
Command to save the states:
alter pluggable database <pdb name> save state;
To discard the saved state:
alter pluggable database <pdb name> discard state;
We can also create trigger in the CDB to automatically open the pluggable on startup:
CREATE TRIGGER open_all_pdbs
AFTER STARTUP ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';
END open_all_pdbs;
/
No comments:
Post a Comment