Disabling Triggers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neil

    Disabling Triggers

    I wrote in a separate thread ("Update Query Runs Forever") about a problem
    I'm having with an update query that updates 1200 rows, that it never
    completes. I recently added a trigger on the table being updated to append a
    copy of the row to a history table. I wonder if that might be causing the
    problem.

    Either way, a copy in the history table is not necessary when this operation
    is performed. Is there a way to disable a trigger or otherwise cause it to
    not run in situations such as this?

    I'm running SQL 7.

    Thanks!

    Neil


  • Plamen Ratchev

    #2
    Re: Disabling Triggers

    You can use:

    ALTER TABLE <table_nameDISA BLE TRIGGER <trigger_name | ALL

    To enable:

    ALTER TABLE <table_nameENAB LE TRIGGER <trigger_name | ALL

    HTH,

    Plamen Ratchev

    Comment

    • Neil

      #3
      Re: Disabling Triggers

      Thanks!

      "Plamen Ratchev" <Plamen@SQLStud io.comwrote in message
      news:FfqdnYIals aS7NjVnZ2dnUVZ_ h7inZ2d@speakea sy.net...
      You can use:
      >
      ALTER TABLE <table_nameDISA BLE TRIGGER <trigger_name | ALL
      >
      To enable:
      >
      ALTER TABLE <table_nameENAB LE TRIGGER <trigger_name | ALL
      >
      HTH,
      >
      Plamen Ratchev
      http://www.SQLStudio.com

      Comment

      Working...