4 Feb 2013

How to check the status & Enable / Disable a trigger???

Before finding out how to check the status & enable or disable a trigger it is best to know what a trigger is & what it does.

A trigger is a named program unit that is stored in the database and executed in response to a specified event. When a trigger is initiated it does its intended function such as copying a data from one table to another (or) automatically executing a concurrent request, etc.,

With the following query we can find the status of a trigger,

select status from user_triggers where trigger_name = 'Name of the trigger'
Ex: select status from user_triggers where trigger_name = 'JA_IN_GEM_PM_MATL_DTL_T1'

Enabling Triggers:

If the status of the trigger is in disabled status, then with the following query we can enable it.
alter trigger trigger_name enable;
Ex: alter trigger JA_IN_GEM_PM_MATL_DTL_T1 enable;

Click Commit button.


Disabling Triggers:

If the status of the trigger is in enabled status, then with the following query we can disable it.
alter trigger trigger_name disable;
Ex: alter trigger JA_IN_GEM_PM_MATL_DTL_T1 disable;

Click Commit button.


---X--- 





No comments:

Copyright © 2015 an ORACLE APPS blog. All Rights Reserved.