Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Dead Lock Help.. Expand / Collapse
Author
Message
Posted Sunday, June 15, 2014 12:33 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, December 23, 2014 3:00 PM
Points: 243, Visits: 993
Hi All,

I need big favor, Here is my question, I am getting dead lock error.
When I try to insert data from Application, the table I am inserting data has trigger, I think
thats why I am getting dead lock error. The SP I am using through Application to insert data, its very simple
only two statment, first Insert statement and then Update statement, I am using 5 second delay on both statement
but still having problem. Any advise?

Thank You,
Post #1580911
Posted Sunday, June 15, 2014 1:10 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:59 PM
Points: 2,557, Visits: 7,183
Could you share some more information such as execution plan, sp_lock and sp_who2 output?
Also check out these two articles


How To Monitor Deadlocks in SQL Server

Detecting and Ending Deadlocks
Post #1580914
Posted Sunday, June 15, 2014 2:48 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, December 15, 2014 3:31 PM
Points: 115, Visits: 551
Disable the trigger and try again.
What does the trigger do (update other tables, etc.)?
Do you run a transaction?



Post #1580915
Posted Sunday, June 15, 2014 4:09 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:01 AM
Points: 14,208, Visits: 28,538
SQL Server 2008 has a system_health extended event session. I'm pretty sure it's capturing information from your deadlock called a deadlock graph. You'll need to query the files to get the information. Here's an article on how to get that done. You won't have to turn on traceflags or recreate the issue. When you have the deadlock graph, zip it up and post it here to get help interpreting it.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server Query Performance Tuning
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1580919
Posted Sunday, June 15, 2014 2:46 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:39 PM
Points: 40,672, Visits: 37,137
And for some general info - https://www.simple-talk.com/sql/performance/sql-server-deadlocks-by-example/


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1580962
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse