본문 바로가기

Database/PLSQL

119 - [Oracle PL/SQL] Trigger to open the PDB on start up.

1-      Connect as sys as sysdba

2-      Make sure that you are on the root database ( the container )

3-      You can make sure from this by

show con_name

it should give you like this CDB$ROOT

 

4-      Then you have to execute this code

create or replace TRIGGER pdb_startup

AFTER STARTUP ON DATABASE

BEGIN

EXECUTE IMMEDIATE 'alter pluggable database all open';

END;