I'd like to disable 'all' the triggers at once in a schema for data loading, how can I do it without issuing the following for every single table?
ALTER TABLE xxx
DISABLE ALL TRIGGERS;
There is an internal table called user_triggers
this will hold all the triggers pertains to your schema.
just build a sql like this
select 'alter table '|| table_name||' disable all triggers ; '
spool this output to a file and execute.
Once bulk loading is complete,
build the same script to enable it.
There is nothing Impossible.
Even Impossible says
I M POSSIBLE
Here is a script that can be used without any Damage.
select 'Alter Trigger '||Trigger_Name||' Disable ;'
To Enable Use this one
Select 'Alter Trigger '||Trigger_name ||' Enable ;'
Hope this will help you.
Click Here to Expand Forum to Full Width