Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Other SQL Server Topics / June 2005

Tip: Looking for answers? Try searching our database.

Deadlock

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markus Eßmayr - 30 Jun 2005 08:32 GMT
Hi there!

In my database client application (C#) I sometimes get an exception telling
me, that my application (which runs a some kind ob batch job) was selected
as deadlock victim and the active transaction was terminated.
No I want to get mor information about, which other application causes the
deadlock.

I thought about executing "sp_lock" just after I received the
deadlock-exception, but I think that this is too late, because my
transaction will be already terminated at this time, and ther won't be a
deadlock any longer.

Can anyone tell me, what would be the best way to receive information about
the active database-connections and their locks, BEFORE the deadlock
situation is cleared by the database-engine?
Is there some kind of trigger or sth. like that?

As the problem doesn't occur regularly, and it's only on the productive
machine, I absolutely don't want to have the profiler active!

Thanks in advance!
Max
Uri Dimant - 30 Jun 2005 08:56 GMT
Markus
Take a look at sp_who2 stored procedure on clolumn blkby (If I remember
well) . That tells you who is blocked and by whom.

Regarding to DEADLOCKS please visit at this site

http://www.sql-server-performance.com/deadlocks.asp

> Hi there!
>
[quoted text clipped - 19 lines]
> Thanks in advance!
> Max
Luciano Caixeta Moreira - 30 Jun 2005 15:08 GMT
   Use the trace flag 1024 to receive notifications about deadlocks.

   DBCC TRACEON (1024, -1)

   []s
   Luciano Caixeta Moreira
   Meu blog: http://br.thespoke.net/MyBlog/Luti/MyBlog.aspx

> Markus
> Take a look at sp_who2 stored procedure on clolumn blkby (If I remember
[quoted text clipped - 31 lines]
>> Thanks in advance!
>> Max
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.