conditionally store triggers status in temp table

  • I'm looking for generic script which will  selectively  store status of triggers  in temp table and disable them during data manipulation process and enable those tirggers after it. For example I have schema user called 'student' need to disable trigger for  this user during data manipulation and enable trigger afterthe process

    Thanks  in advance

     

  • 
    
    
    SQL Server 2005 offers a better approach!
     
     
    ENABLE TRIGGER { [ schema_name . ] trigger_name [ ,...n ] | ALL }ON { object_name | DATABASE | ALL SERVER } [ ; ]
    DISABLE TRIGGER { [ schema . ] trigger_name [ ,...n ] | ALL }ON { object_name | DATABASE | ALL SERVER } [ ; ]
     

    N 56°04'39.16"
    E 12°55'05.25"

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

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