Disable Triggers
Posted in 2015
Topics: Triggers, Constraints & Referential Integrity
Hi, We are running Informix 11.70.FC7. Is there a way to disable triggers on a table for a specific session and not for all sessions? As user Informix we need to do monthly processing to delete/archive older records from tables however we do not want the triggers on the tables to get triggered. (We cannot fragment the tables as the business rules and exceptions are very complicated as to which data can be deleted/archived.) We cannot disable the triggers for all sessions as we want the triggers to run for all other application activity. Is there a way as part of the batch process to disable the trigger only for the current session? Any suggestions? Thank You, --David --001a11469bd8ff047e0527054f8f
Not that I know of... One way round I can see is that if you're executing a procedure or function in the trigger action clause then you can add logic to the proc/func to test for the username and exit prematurely for certain names? On Wed, Dec 16, 2015 at 3:11 PM, Informix DBA <in4mixdba@gmail.com> wrote: > Hi, > > We are running Informix 11.70.FC7. Is there a way to disable triggers on a > table for a specific session and not for all sessions? > > As user Informix we need to do monthly processing to delete/archive older > records from tables however we do not want the triggers on the tables to > get triggered. (We cannot fragment the tables as the business rules and > exceptions are very complicated as to which data can be deleted/archived.) > We cannot disable the triggers for all sessions as we want the triggers to > run for all other application activity. Is there a way as part of the > batch process to disable the trigger only for the current session? > > Any suggestions? > > Thank You, > > --David > > --001a11469bd8ff047e0527054f8f > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --089e01176343d4262f0527057023
Not that I am aware of but assuming the trigger fires a SPL call you could logically disable the trigger action within the SPL - trivial to implement Cheers Paul Paul Watson Oninit www.oninit.com +1 913 387 7529 Oninit® is a Registered Trademark of Oninit LLC > On Dec 16, 2015, at 09:11, Informix DBA <in4mixdba@gmail.com> wrote: > > Hi, > > We are running Informix 11.70.FC7. Is there a way to disable triggers on a > table for a specific session and not for all sessions? > > As user Informix we need to do monthly processing to delete/archive older > records from tables however we do not want the triggers on the tables to > get triggered. (We cannot fragment the tables as the business rules and > exceptions are very complicated as to which data can be deleted/archived.) > We cannot disable the triggers for all sessions as we want the triggers to > run for all other application activity. Is there a way as part of the > batch process to disable the trigger only for the current session? > > Any suggestions? > > Thank You, > > --David > > --001a11469bd8ff047e0527054f8f > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum.
Thank you Malc and Paul, Those are great suggestions and I will likely go with your ideas. Thank You, --David On Wed, Dec 16, 2015 at 10:32 AM, Paul Watson <paul@oninit.com> wrote: > Not that I am aware of but assuming the trigger fires a SPL call you could > logically disable the trigger action within the SPL - trivial to implement > > Cheers > Paul > > Paul Watson > Oninit www.oninit.com > +1 913 387 7529 > > Oninit® is a Registered Trademark of Oninit LLC > > > On Dec 16, 2015, at 09:11, Informix DBA <in4mixdba@gmail.com> wrote: > > > > Hi, > > > > We are running Informix 11.70.FC7. Is there a way to disable triggers on > a > > table for a specific session and not for all sessions? > > > > As user Informix we need to do monthly processing to delete/archive older > > records from tables however we do not want the triggers on the tables to > > get triggered. (We cannot fragment the tables as the business rules and > > exceptions are very complicated as to which data can be > deleted/archived.) > > We cannot disable the triggers for all sessions as we want the triggers > to > > run for all other application activity. Is there a way as part of the > > batch process to disable the trigger only for the current session? > > > > Any suggestions? > > > > Thank You, > > > > --David > > > > --001a11469bd8ff047e0527054f8f > > > > > > > > ******************************************************************************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --047d7bf198b8d51262052709b558