Results 1 to 4 of 4

Thread: Trigger

  1. #1
    Join Date
    Oct 2003
    Posts
    83

    Unanswered: Trigger

    From query analyzer one can enable or disable a trigger of a table.My question is how do I know wheather a trigger is enable or disable for a table(with out testing the trigger)?

  2. #2
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    SELECT OBJECTPROPERTY(OBJECT_ID(trigger_name),ExecIsTrigg erDisabled)
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  3. #3
    Join Date
    Oct 2003
    Posts
    83
    It is not working.
    I need to have a correct sysntax which is applicable to SQL SERVER2000.

  4. #4
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    create table test33(id int,col int)
    go
    create trigger tr_test33 on test33
    for insert,update,delete
    as
    rollback
    go
    SELECT OBJECTPROPERTY(OBJECT_ID('tr_test33'),'ExecIsTrigg erDisabled')
    go
    ALTER TABLE test33 DISABLE TRIGGER tr_test33
    go
    SELECT OBJECTPROPERTY(OBJECT_ID('tr_test33'),'ExecIsTrigg erDisabled')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •