Amazon books

Wednesday, May 21, 2014

Trigger to OPEN all PDBs after starting CDB - Database 12c

If you want to automatize your PDBs to open soon as CDB opens, create a trigger like below:

sqlplus / as sysdba

create or replace trigger OPEN_PDBS after startup on database 
begin 
   execute immediate 'alter pluggable database all open'; 
end OPEN_PDBS;
/

--Testing

SQL> shut immediate
SQL> startup
SQL> select name, open_mode from v$pdbs;



Best Regards,
Paulo Portugal

No comments:

Post a Comment