Specific MS SQL tables hanging in queries

I have SQL Server 2008. I am running a query on a table in a database. The strangest thing is happening. I ran a simple select statement on a table. I know that table 62 has rows, but it gets stuck on row 48 and continues with "query ...". He waited for hours, and from there he did not move. I know only two programs and one reporting service that connects to this particular table and to one other user. Does anyone have any idea what could be causing this, and how can I track the source of the lock in this table?

As a note, I noticed that in the logs there was only a notification that Autogrow failed the day before I checked. Can this do something about it?

+6
sql-server sql-server-2008
source share
1 answer

What if you do

SELECT * FROM YourTable WITH(NOLOCK) 

Is he still hanging?

Also, if it is really locked, you can try to run

 exec sp_who2 

And look in the BlkBy column to find out which process is blocking you.

If this does not shed light, this article provides some information about some DMVs that could help get an idea of ​​the reasons for the wait.

+9
source share

All Articles