Getting the Status of an Oracle Trigger

Written by: Christian Desserich

Just a quick post about trying to determine the enabled/disabled status of an Oracle trigger. I found code snippets like this:

Or like this:

The first only gives you the triggers owned by the user session so if you are logged in as the admin, this won’t work for a trigger in a schema. The second one doesn’t work because the status of the object as Valid/Invalid. I figured if there is an all_objects table, there must be an all_triggers table. There is. This worked for me: