1

I am trying to insert a record into a table, but I cannot. The execution never ends. I can do select though. I guess something locking my table? How can I find out what does it?

Thanks.

4

1 回答 1

0

如果您具有以下必要权限,则可以在 SQL Server Management Studio (SSMS) 中运行,以找出锁定表的进程。

sp_who
sp_who2
sp_lock

然后,您可以KILL通过从上述 SP 中的 1 个获取进程 ID 来处理有问题的进程。

-- Kill Server process ID 123
KILL 123
于 2013-12-03T18:34:18.483 回答