HPvH
asked on
SQL to show all triggers from a schema
Hi,
Is it posible to show all triggers from one schema (oracle 9)?
I want to get this through a winsql statement.
Thanks!
HPvH
Is it posible to show all triggers from one schema (oracle 9)?
I want to get this through a winsql statement.
Thanks!
HPvH
This should give you the list of triggers and the table the trigger is on for an entire schema.
select trigger_name, table_name
from dba_triggers
where owner = '<schema>';
select trigger_name, table_name
from dba_triggers
where owner = '<schema>';
ASKER
Hi,
If I run this:
select trigger_name, table_name from dba_triggers where owner = 'SALESMAN';
I get this:
Error: ORA-00942: table or view does not exist
(State:S0002, Native Code: 3AE)
If I run this:
select trigger_name, table_name from dba_triggers where owner = 'SALESMAN';
I get this:
Error: ORA-00942: table or view does not exist
(State:S0002, Native Code: 3AE)
You might not have access to DBA views.
Try this : -
SELECT * FROM user_triggers;
SELECT * FROM all_triggers WHERE owner = 'owner_schema';
Try this : -
SELECT * FROM user_triggers;
SELECT * FROM all_triggers WHERE owner = 'owner_schema';
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
SELECT * FROM user_triggers;
If you are logged in as a DBA role user:
SELECT * FROM dba_triggers WHERE owner = 'SCOTT';