USE test go if object_id('dbo.p1','P') is not null drop procedure dbo.p1 go if object_id('dbo.p1a','P') is not null drop procedure dbo.p1a go if object_id('dbo.p1b','P') is not null drop procedure dbo.p1b go if object_id('dbo.p1c','P') is not null drop procedure dbo.p1c go if object_id('dbo.p1d','P') is not null drop procedure dbo.p1d go if object_id('dbo.p1e','P') is not null drop procedure dbo.p1e go if object_id('dbo.GetData','P') is not null drop procedure dbo.GetData go if object_id('dbo.t2','U') is not null drop table dbo.t2 go if object_id('dbo.t1','U') is not null drop table dbo.t1 go if object_id('dbo.err','U') is not null drop table dbo.err go CREATE TABLE dbo.t1 (c1 int constraint pkc_t1__c1 PRIMARY KEY clustered , c2 nvarchar(1000)) go CREATE TABLE dbo.t2 (c1 int , constraint fk_t2__c1__TO__t1__c1 foreign key (c1) references t1 (c1)) go CREATE TABLE dbo.err (errId int identity(1,1) constraint pkc_err__errId primary key clustered , c1 int , c2 nvarchar(1000) , date datetime constraint dft_err__date default getdate()) go create procedure dbo.GetData as -- view the current contents of the test tables t1, t2, and err set nocount on select c1, c2 from dbo.t1 select c1 from dbo.t2 select errId, c1, c2, date from dbo.err select @@trancount [Open Transaction Count] go create procedure dbo.p1 @a int , @b nvarchar(1000) as -- primary key insert test set nocount on set xact_abort on print @b begin try begin tran insert dbo.t1 (c1, c2) values (@a, @b) insert dbo.t2 (c1) values (@a) commit tran end try begin catch tran_abort rollback tran insert dbo.err (c1, c2) values (@a, @b) print 'Caught one!' exec dbo.GetData end catch exec dbo.GetData go create procedure dbo.p1a @a int , @b nvarchar(1000) as -- reference to missing object test set nocount on set xact_abort on print @b begin try begin tran insert dbo.t1 (c1, c2) values (@a, @b) insert dbo.t2 (c1) values (@a) insert dbo.NoSuchTable (c1) values (@b) print 'in-line print inside of Try block but after error' select 'select inside of Try block but after error' commit tran end try begin catch tran_abort rollback tran insert err (c1, c2) values (@a, @b) print 'Caught one!' exec dbo.GetData print 'Still processing in-line print but nothing for the call to "GetData"' select c1, c2 from dbo.t1 select c1 from dbo.t2 select errId, c1, c2, date from dbo.err select @@trancount [Open Transaction Count] print 'and nothing returned by in-line selects?' end catch -- test execution awareness ouside of Try-Catch block select 'select outside of catch block but still with procedure does not return results.' print 'in-line print outside of Catch block is processed but as you can see, not a select?' go create procedure dbo.p1b @a int , @b nvarchar(1000) as -- fkey test set nocount on set xact_abort on print @b begin try begin tran insert dbo.t2 (c1) values (@a) commit tran end try begin catch tran_abort rollback tran insert err (c1, c2) values (@a, @b) print 'Caught one!' end catch go create procedure dbo.p1c @a int , @b nvarchar(1000) as -- raiserror without xact_abort set nocount on --set xact_abort on print @b begin try begin tran insert dbo.t1 (c1, c2) values (@a, @b) insert dbo.t2 (c1) values (@a) raiserror('plain vanilla level 10 error',10,1) raiserror('plain vanilla level 16 error',16,1) raiserror('level 10 error "with tran_abort"',10,1) with tran_abort raiserror('another plain vanilla level 16 error',16,1) commit tran end try begin catch tran_abort rollback insert err (c1, c2) values (@a, @b) print 'Caught one!' end catch go create procedure dbo.p1d @a int , @b nvarchar(1000) as -- raiserror without xact_abort and with no explicit transaction set nocount on set xact_abort off print @b begin try -- begin tran insert dbo.t1 (c1, c2) values (@a, @b) insert dbo.t2 (c1) values (@a) raiserror('level 10 error "with tran_abort"',10,1) with tran_abort -- commit tran end try begin catch tran_abort rollback insert err (c1, c2) values (@a, @b) print 'Caught one!' end catch go create procedure dbo.p1e @a int , @b nvarchar(1000) as -- try some different updates and deletes and the catch block set nocount on set xact_abort on print @b begin try begin tran insert dbo.t1 (c1, c2) values (@a, @b) insert dbo.t2 (c1) values (@a) commit tran end try begin catch tran_abort rollback insert err (c1, c2) values (@a, @b) print 'Caught one!' print 'attempt an update of t1 and a delete of t2' update dbo.t1 set c2 = c2 + ' (error occurred)' delete dbo.t2 print 'attempt an update of err' update dbo.err set c2 = c2 + ' (error occurred)' select count(*) [one last select test] from dbo.t1 print 'try an insert based on a select' insert dbo.err (c1, c2) select c1, c2 from dbo.t1 end catch go exec dbo.GetData go exec dbo.p1 1, 'empty table test cycle' go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1 2, 'unique pkey test cycle' go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1 1, 'duplicate pkey test cycle' go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1a 1, 'duplicate pkey and invalid table test cycle' exec dbo.GetData print 'inline print still in batch but outside procedure even runs but not a called procedure?' go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1a 3, 'unique pkey and invalid table test cycle' go select 'Lets look at the data anyway, but in a new batch...' exec dbo.GetData print 'Notice the open transaction!' exec dbo.GetData go -- close any open transactions to set up for next test cycel while @@trancount > 0 rollback tran go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go insert t1 (c1, c2) values (4,'set up for a valid child table insert but do not insert the child row yet') go exec dbo.p1b 4, 'valid child table insert test cycle' go exec dbo.GetData go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1b 9, 'child table insert with fkey violation test cycle' go exec dbo.GetData go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1c 5, 'escalating raiserror with xact_abort off test cycle' go exec dbo.GetData go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1c 1, 'escalating raiserror with xact_abort off and pkey violations test cycle' go exec dbo.GetData go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) go exec dbo.p1d 6, 'raiserror with tran_abort with xact_abort off and no explicit transaction test cycle' go exec dbo.GetData go exec dbo.p1e 1, 'duplicate key with additional catch block IUD processing' go exec dbo.GetData go while @@trancount > 0 rollback tran go exec dbo.GetData go print '---------- end test cycle ----------' + char(13) + char(10) + char(13) + char(10) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX output follows XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- c1 ----------- errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- Open Transaction Count ---------------------- 0 (1 row(s) affected) empty table test cycle c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle (1 row(s) affected) c1 ----------- 1 (1 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ---------- unique pkey test cycle c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle (2 row(s) affected) c1 ----------- 1 2 (2 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ---------- duplicate pkey test cycle .Net SqlClient Data Provider: Msg 2627, Level 14, State 1, Procedure p1, Line 11 Violation of PRIMARY KEY constraint 'pkc_t1__c1'. Cannot insert duplicate key in object 't1'. Caught one! ---------- end test cycle ---------- duplicate pkey and invalid table test cycle .Net SqlClient Data Provider: Msg 2627, Level 14, State 1, Procedure p1a, Line 11 Violation of PRIMARY KEY constraint 'pkc_t1__c1'. Cannot insert duplicate key in object 't1'. Caught one! Still processing in-line print but nothing for the call to "GetData" and nothing returned by in-line selects? in-line print outside of Catch block is processed but as you can see, not a select? inline print still in batch but outside procedure even runs but not a called procedure? ---------- end test cycle ---------- unique pkey and invalid table test cycle .Net SqlClient Data Provider: Msg 208, Level 16, State 1, Procedure p1a, Line 1 Invalid object name 'dbo.NoSuchTable'. .Net SqlClient Data Provider: Msg 266, Level 16, State 2, Procedure p1a, Line 1 Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1. --------------------------------------------------- Lets look at the data anyway, but in a new batch... (1 row(s) affected) c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 3 unique pkey and invalid table test cycle (3 row(s) affected) c1 ----------- 1 2 3 (3 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM (2 row(s) affected) Open Transaction Count ---------------------- 1 (1 row(s) affected) Notice the open transaction! c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 3 unique pkey and invalid table test cycle (3 row(s) affected) c1 ----------- 1 2 3 (3 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM (2 row(s) affected) Open Transaction Count ---------------------- 1 (1 row(s) affected) ---------- end test cycle ---------- valid child table insert test cycle c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 4 set up for a valid child table insert but do not insert the child row yet (3 row(s) affected) c1 ----------- 1 2 4 (3 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM (2 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ---------- child table insert with fkey violation test cycle .Net SqlClient Data Provider: Msg 547, Level 16, State 0, Procedure p1b, Line 11 INSERT statement conflicted with FOREIGN KEY constraint 'fk_t2__c1__TO__t1__c1'. The conflict occurred in database 'test', table 't1', column 'c1'. Caught one! c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 4 set up for a valid child table insert but do not insert the child row yet (3 row(s) affected) c1 ----------- 1 2 4 (3 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM 3 9 child table insert with fkey violation test cycle 12/20/2003 9:54:05 PM (3 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ---------- escalating raiserror with xact_abort off test cycle plain vanilla level 10 error .Net SqlClient Data Provider: Msg 50000, Level 16, State 1, Procedure p1c, Line 14 plain vanilla level 16 error level 10 error "with tran_abort" Caught one! c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 4 set up for a valid child table insert but do not insert the child row yet (3 row(s) affected) c1 ----------- 1 2 4 (3 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM 3 9 child table insert with fkey violation test cycle 12/20/2003 9:54:05 PM 4 5 escalating raiserror with xact_abort off test cycle 12/20/2003 9:54:05 PM (4 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ---------- escalating raiserror with xact_abort off and pkey violations test cycle .Net SqlClient Data Provider: Msg 2627, Level 14, State 1, Procedure p1c, Line 11 Violation of PRIMARY KEY constraint 'pkc_t1__c1'. Cannot insert duplicate key in object 't1'. .Net SqlClient Data Provider: Msg 50000, Level 16, State 1, Procedure p1c, Line 14 plain vanilla level 16 error The statement has been terminated. plain vanilla level 10 error level 10 error "with tran_abort" Caught one! c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 4 set up for a valid child table insert but do not insert the child row yet (3 row(s) affected) c1 ----------- 1 2 4 (3 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM 3 9 child table insert with fkey violation test cycle 12/20/2003 9:54:05 PM 4 5 escalating raiserror with xact_abort off test cycle 12/20/2003 9:54:05 PM 5 1 escalating raiserror with xact_abort off and pkey violations test cycle 12/20/2003 9:54:06 PM (5 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ---------- raiserror with tran_abort with xact_abort off and no explicit transaction test cycle level 10 error "with tran_abort" .Net SqlClient Data Provider: Msg 3903, Level 16, State 1, Procedure p1d, Line 17 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. Caught one! c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle 2 unique pkey test cycle 4 set up for a valid child table insert but do not insert the child row yet 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (4 row(s) affected) c1 ----------- 1 2 4 6 (4 row(s) affected) errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle 12/20/2003 9:54:05 PM 3 9 child table insert with fkey violation test cycle 12/20/2003 9:54:05 PM 4 5 escalating raiserror with xact_abort off test cycle 12/20/2003 9:54:05 PM 5 1 escalating raiserror with xact_abort off and pkey violations test cycle 12/20/2003 9:54:06 PM 6 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle 12/20/2003 9:54:06 PM (6 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) duplicate key with additional catch block IUD processing .Net SqlClient Data Provider: Msg 2627, Level 14, State 1, Procedure p1e, Line 11 Violation of PRIMARY KEY constraint 'pkc_t1__c1'. Cannot insert duplicate key in object 't1'. Caught one! attempt an update of t1 and a delete of t2 attempt an update of err try an insert based on a select c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle (error occurred) 2 unique pkey test cycle (error occurred) 4 set up for a valid child table insert but do not insert the child row yet (error occurred) 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (error occurred) (4 row(s) affected) c1 ----------- errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle (error occurred) 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle (error occurred) 12/20/2003 9:54:05 PM 3 9 child table insert with fkey violation test cycle (error occurred) 12/20/2003 9:54:05 PM 4 5 escalating raiserror with xact_abort off test cycle (error occurred) 12/20/2003 9:54:05 PM 5 1 escalating raiserror with xact_abort off and pkey violations test cycle (error occurred) 12/20/2003 9:54:06 PM 6 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (error occurred) 12/20/2003 9:54:06 PM 7 1 duplicate key with additional catch block IUD processing (error occurred) 12/20/2003 9:54:06 PM 8 1 empty table test cycle (error occurred) 12/20/2003 9:54:06 PM 9 2 unique pkey test cycle (error occurred) 12/20/2003 9:54:06 PM 10 4 set up for a valid child table insert but do not insert the child row yet (error occurred) 12/20/2003 9:54:06 PM 11 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (error occurred) 12/20/2003 9:54:06 PM (11 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) c1 c2 ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 empty table test cycle (error occurred) 2 unique pkey test cycle (error occurred) 4 set up for a valid child table insert but do not insert the child row yet (error occurred) 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (error occurred) (4 row(s) affected) c1 ----------- errId c1 c2 date ----------- ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- 1 1 duplicate pkey test cycle (error occurred) 12/20/2003 9:54:05 PM 2 1 duplicate pkey and invalid table test cycle (error occurred) 12/20/2003 9:54:05 PM 3 9 child table insert with fkey violation test cycle (error occurred) 12/20/2003 9:54:05 PM 4 5 escalating raiserror with xact_abort off test cycle (error occurred) 12/20/2003 9:54:05 PM 5 1 escalating raiserror with xact_abort off and pkey violations test cycle (error occurred) 12/20/2003 9:54:06 PM 6 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (error occurred) 12/20/2003 9:54:06 PM 7 1 duplicate key with additional catch block IUD processing (error occurred) 12/20/2003 9:54:06 PM 8 1 empty table test cycle (error occurred) 12/20/2003 9:54:06 PM 9 2 unique pkey test cycle (error occurred) 12/20/2003 9:54:06 PM 10 4 set up for a valid child table insert but do not insert the child row yet (error occurred) 12/20/2003 9:54:06 PM 11 6 raiserror with tran_abort with xact_abort off and no explicit transaction test cycle (error occurred) 12/20/2003 9:54:06 PM (11 row(s) affected) Open Transaction Count ---------------------- 0 (1 row(s) affected) ---------- end test cycle ----------