views:

4343

answers:

4

Hi. During the ASP.NET execution of my app, it seems SQL 2008 Express holds some lock, and I get

Timeout expired.  The timeout period elapsed prior to completion of

the operation or the server is not responding

Maybe some of my query is not optimized. Visual Studio crashes with:

Microsoft Visual Studio may be unstable now. It is recommended that

you save all files and exit.

I need to see what query is blocking my tables, but I have the Express version. How can I do?

Thanks

A: 

You can query against the sys.dm_tran_locks dynamic view to obtain this information. Go here on MSDN to lean more.

Matt Spradley
can I view the query that is blocking?
Robert
A: 

all you have to do is execute this

sp_who

tells you everything you need to know.

Eric
A: 

sp_who2 is a newer version of sp_who

Cade Roux
+2  A: 
exec sp_lock

and

exec sp_who2
Jeff Meatball Yang