Disable Trigger - Procedure
I have a procedure as below to disable triggers. When I execute only the first trigger is disabled. Rest of the triggers are not disabled. But when executing the same code as pl/sql by replacing the "PROCEDURE disable_trigger AS" to declare and run a PL/SQL script it disables all triggers.
WHERE owner = 'EDWDM';
build_sql VARCHAR2 (500);
FOR tc IN trigger_cur
'ALTER TRIGGER SIEBEL.' || tc.trigger_name || ' DISABLE';
EXECUTE IMMEDIATE (build_sql);
Thank you for the help
you are selecting where owner - 'EDWDM' but then using alter trigger siebel.
I have change the owner and tried again. It still does not loop through all the records and disable.
Spool out "build_sql" after execute immediate and see what is happening.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width