Find Locks on a table

We have table and we are unable to truncate,delete, or rename the table. I am getting an error message "Error 1222: Lock request time out period exceeded"

Looks like there are locks on this table but I am find and end the locks. I tried SP_who2 and other Sp_lock but did not find anything. Please advice me how to resolve this issue.
SrivAsked:
Who is Participating?
 
Peter KipropCommented:
The simplest solution to this is to restart the service (MSSQL service). You can also check if there could be an open transaction by executing
DBCC opentran() and if there is then kill (spid)
0
 
ste5anSenior DeveloperCommented:
The lock timeout is set by your client application. So you need to run sp_who2/sp_lock (or the activity monitor in SSMS) while that application tries to execute these statements.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
How big is that table?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You just choose the worst solution possible. Restarting SQL Server isn't a solution and can provoke another unexpected issues and it also doesn't solve your problem as it will return soon.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.