sql server - The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION -


here's strange problem i'm running on production server. has happened twice in last 2 weeks, , server gets lot of traffic.

we have code in web service executes begin tran, runs few sql queries (two inserts followed update). @ end executes commit. twice have gotten message in logs:

the commit transaction request has no corresponding begin transaction.

between first 2 inserts , update, call web service, there slight delay between first 2 inserts , last update before commit called. causing our problem? we're running on iis 7 , server 2008 r2 (all updated applied).

originally though the app pools getting recycled, changed recycle in middle of night. i'm not sure causing sql server forget call begin tran.

this web service called quite bit. has seen before? i'm @ total loss @ moment...

any or suggestion appreciated greatly!

it looks transaction failed, got rolled , there nothing commit

example of such thing

create table blatest(id int primary key not null) go 

now run this

begin tran  insert blatest values('a') go  commit tran 

here error

msg 245, level 16, state 1, line 3 conversion failed when converting varchar value 'a' data type int. msg 3902, level 16, state 1, line 2 commit transaction request has no corresponding begin transaction. 

this run without problem

begin tran  insert blatest values(5) go  commit tran 

a article on transactions error handling in sql 2005 , later erland sommarskog


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -