How to automate the opening of pluggable databases after the Container DataBase (CDB) starts up?
Solution
Create a database startup trigger to open all pluggable databases.
sqlplus / as sysdba
create or replace trigger open_all_pdbs after startup on database begin execute immediate ‘alter pluggable database all open’; end; /
Or to selectively startup pluggable databases, use separate commands for each.
create or replace trigger open_all_pdbs after startup on database begin execute immediate ‘alter pluggable database MYCDB1 open’; execute immediate ‘alter pluggable database MYCDB2 open’; end; /
Comments