Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
erde
Starting Member
6 Posts |
Posted - 2006-10-11 : 11:01:30
|
| Why is the result (open transactions) of the following script different when executing in sql server 2000 and sql 2005?With sql server 2000 I have an open transaction, with sql 2005, all transactions are rolled back.set nocount onif object_id('test') is not null drop procedure testgoif object_id('testtable') is nullexec ('create table testtable (id int, status int)')gocreate procedure test asbeginset xact_abort onbegin tranupdate testtable set status=status where id=2006select * from testtt -- non existing table. --> error.commit tranendgoselect 'Tran 1',@@trancountexec testselect 'Tran 2',@@trancountgoselect 'Tran 3',@@trancountwhile @@trancount<>0 rollback tranif object_id('test') is not null drop procedure testif object_id('testtable') is not null drop table testtablego |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-10-11 : 14:31:17
|
| No TRY CATCH operating in SQL 2005 presumably (you do see the "TRAN 3" transaction count in SQL2k5 presumably?Kristen |
 |
|
|
|
|
|