Trigger function

  • To all

    I have a store procedure that update a table . How can I use a trigger to use the store procedure .  is there any restriction using a trigger . What the difference if I use a DTS

     

    Thanks

     

  • EXEC stored_proc ... But mind unwanted recursion, which can occur, if your stored_proc involves the originating table's data (where the trigger is attached to). The difference to a DTS? Synchronicity, first of all. If your procedure fails or if by design it's purpose is to first check whether the action reported by the trigger should be allowed, you can roll back the whole thing. A DTS is an extra object to manage but may prove useful, if the nature of the things to be done is not critical to data health (e.g. updating statistics or long running reports) and resposiveness in an OLTP is an issue - asynchronicity on purpose.

     


    _/_/_/ paramind _/_/_/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply