Skip to Main Content

Database Software


For appeals, questions and feedback, please email

Logon, Startup, Shutdown triggers for PDB on CDB

Mustafa KalaycıAug 21 2023 — edited Aug 21 2023


it would be nice to have logon, startup and shutdown triggers for PDBS on the CDB.

Let's say I want to take some actions on an after logon trigger on all PDBs in a CDB, I have to create (or add into an existing one) a logon trigger for every PDB and take the action. Since we can reach all sessions in CDB via v$session, it would be much more easier to have logon trigger that run for all pdbs in a cdb. that way we could isolate our codes from pdbs and we don't have to create same trigger on every pdb.

same thing applies to startup and shutdown triggers too. if I have a monitoring system on my cdb, to understand that a pdb is closed, I must create a before shutdown trigger into all pdbs or query v$pdbs, v$containers or dba_pdbs every N second too check if they are closed or not.

edit: I couldn't find old "DATABASE IDEAS" section and when I search for old threads, I found them under this section with some tag, so I add them. I would be glad if moderators move the thread to a more appropriate section if there is one.

Post Details
Added on Aug 21 2023