Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Need Help.
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

224 Posts

Posted - 04/12/2013 :  01:22:52  Show Profile  Reply with Quote
Hi Guys,

I need help.

I have few questions.

1) Let say if i am running any query
E.G select * from table1 and its taking to long to execute it and i stop the query
did this step cause table dead lock problem?

2) when you execute sp_who and if status = runnable, what do you think, did this
causing table dead lock error.

I know how dead lock happend.

3) Is there any query to find out which table has dead lock?

Any help would be great appreciate.

Flowing Fount of Yak Knowledge

2242 Posts

Posted - 04/12/2013 :  01:54:53  Show Profile  Reply with Quote
By using SQL Profiler, you can get to know the details

Edited by - bandi on 04/12/2013 01:57:07
Go to Top of Page

Flowing Fount of Yak Knowledge

1054 Posts

Posted - 04/12/2013 :  10:12:01  Show Profile  Reply with Quote
assuming that you know about what is deadlock or how it occurs.

by default, when a deadlock occurs, SQL server kills (and rollback) one of the process automatically with a message. And the other one is executed.

So to your questions

1) If your query took considerably longer than normal execution time and you stop it explicitly, then most likely it would be a locked situation instead of a deadlock. since as I mentioned deadlocked situation is handled by SQL server automatically.

2) I would rather like you to refer towards BOL to find out the exact meaning of each column's value. In your case, blkBy information will tell you whether the process is, blocking/blocked by some, other process.

3) In addition to the @bandi's two references, you may like to have go through the extended events, reading SQL server error log files.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000