jasper04
Technical User
- Aug 24, 2007
- 6
any one help me with script to disable and enable triggers for schema user. Schema user is Student
Thanks
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
select trigger_name,status from user_triggers;
TRIGGER_NAME STATUS
------------------------------ --------
FILIPE_EMAIL_CHECK ENABLED
INSERT_CH1 ENABLED
MYEEPULSE_TRIGGER3 ENABLED
MYEEPULSE_TRIGGER4 ENABLED
TREVOR_SEQ_GEN ENABLED
TRGTST ENABLED
TRG_RO_TEST ENABLED
UPDATE_CH1_VIEW ENABLED
8 rows selected.
begin
for x in (select trigger_name trig from user_triggers order by trig) loop
execute immediate 'alter trigger '||x.trig||' disable';
end loop;
end;
/
PL/SQL procedure successfully completed.
select trigger_name,status from user_triggers;
TRIGGER_NAME STATUS
------------------------------ --------
FILIPE_EMAIL_CHECK DISABLED
INSERT_CH1 DISABLED
MYEEPULSE_TRIGGER3 DISABLED
MYEEPULSE_TRIGGER4 DISABLED
TREVOR_SEQ_GEN DISABLED
TRGTST DISABLED
TRG_RO_TEST DISABLED
UPDATE_CH1_VIEW DISABLED
8 rows selected.
begin
for x in (select trigger_name trig from user_triggers order by trig) loop
execute immediate 'alter trigger '||x.trig||' enable';
end loop;
end;
/
select trigger_name,status from user_triggers;
TRIGGER_NAME STATUS
------------------------------ -------
FILIPE_EMAIL_CHECK ENABLED
INSERT_CH1 ENABLED
MYEEPULSE_TRIGGER3 ENABLED
MYEEPULSE_TRIGGER4 ENABLED
TREVOR_SEQ_GEN ENABLED
TRGTST ENABLED
TRG_RO_TEST ENABLED
UPDATE_CH1_VIEW ENABLED
8 rows selected.