Domanda

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.

È stato utile?

Soluzione

If you have the necessary permissions for the following, you can run then in SQL Server Management Studio (SSMS) to find out the processes that are locking tables.

sp_who
sp_who2
sp_lock

Then you can KILL the process in question by taking the Process ID from 1 of the above SPs.

-- Kill Server process ID 123
KILL 123
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top