[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL Server 2008 Deadlock

Posted on 2014-01-15
5
Medium Priority
?
820 Views
Last Modified: 2014-01-19
How to identify dead lock in SQL 2008 ? How do I know whether a dead lock occur in production environment ? Will the SQL server slow down the performance ?
0
Comment
Question by:AXISHK
  • 2
  • 2
5 Comments
 
LVL 13

Assisted Solution

by:Koen Van Wielink
Koen Van Wielink earned 800 total points
ID: 39784639
Try running the SP_WHO and SP_WHO2 stored procedures. They will show you blocked and blocked by columns that correspond with a session ID. Look up the session ID to see who is locking the database.
0
 
LVL 1

Expert Comment

by:mike706
ID: 39784704
You can also use the activity monitor to see this information.

You can find more information about deadlocks here http://technet.microsoft.com/en-us/library/ms177433%28v=sql.105%29.aspx

Deadlocks are a performance problem because they can prevent 2 or more processes from being able to process data.  A deadlock chain can occur and impact hundreds of spids based on the data access patterns, number of users, object dependencies, etc.
0
 

Author Comment

by:AXISHK
ID: 39791879
Run 'sp_who" and 'sp_who2' but I can't find the 'blocked" or 'blocked  by" column.  Do I make something wrong ?

Tks
0
 
LVL 1

Accepted Solution

by:
mike706 earned 1200 total points
ID: 39792001
It should look something like this.
sp_who2
sp-who2.jpg
0
 

Author Closing Comment

by:AXISHK
ID: 39793194
Tks
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question