Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8667

Re: Application Deadlocks Not being Reported

$
0
0

There is a 1205 error code buried in that message, and the text matches the 1205 ASE error message, so I think the deadlock really is happening in the ASE.

 

 

By default 1205s aren't output to the errorlog because the severity is only a 13.

We might try also using 

     sp_altermessage 1205, "with_log", true

 

to see if that will cause the message to be output when deadlocks occur.

This shouldn't be necessary as the options you have set on should result in output to the errorlog, but we might as well try it.

 

We can also test by deliberately causing a deadlock with two sessions:

 

-- using session 1

use tempdb

go

create table t1 (x int) lock allpages

create table t2 (x int) lock allpages
go

insert t1 values (1)
insert t2 values (2)

go

begin tran

update t1 set x = 3

go

 

-- using session 2

use tempdb

go

begin tran

update t2 set x = 4

go

update t1 set x = 5

go

-- session 2 should now hang, being blocked by session 1

 

-- using session 1

update t2 set x = 6

go

-- a deadlock error should now be raised, terminating one of the two sessions

-- and generating output in the logs.

 

--cleanup

use tempdb

go

drop table t1

go

drop table t2

go


Viewing all articles
Browse latest Browse all 8667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>