Get Username or Computername after lock (or deadlock) errors from MS SQL server (7 or 6.5)

Get Username or Computername after lock (or deadlock) errors from MS SQL server (7 or 6.5)

Post by Gabor Horovit » Wed, 16 Dec 1998 04:00:00



Hi to ALL!

How can I get the additional Username or at least Computername info after a
lock or deadlock violation occours?.

I'm using VB with ADO with OLE-DB provider for SQL Server

PS: How can I get the same info in a SQL script? (for example in a SQL
stored procedure.

thx for help

Gabor Horovitz

 
 
 

Get Username or Computername after lock (or deadlock) errors from MS SQL server (7 or 6.5)

Post by Bob Pfeif » Thu, 17 Dec 1998 04:00:00


You can set trace flag 1204 or 1205 on to capture deadlock info.  This info
can be captured to the error log when trace flag 3605 is set.

Look under "Trace Flags" in books online.

--
Bob Pfeiff
SQL Server MVP