sql server - How do I stop a trigger in an infinite loop? -
let's did stupid creating trigger has infinite loop in it. it's not nesting, or recursive; have while
loop in apparently isn't exiting.
now can't access trigger @ all... can't update it, can't drop it, can't disable it. , none of programs use table it's attached can table because of it. i've exited way out of sql server, when in, have same issue.
any way kill trigger?
provided have requisite permissions here can do:
open / run ssms , connect server in question. change use correct database
in ssms, run sp_who2
this gives list of connections, , state.
take 1 connection spid#
, run dbcc inputbuffer (spid#)
if connection running trigger, can kill connection issuing kill spid#
then read on why avoid triggers.
Comments
Post a Comment