DDL statement and SET XACT_ABORT

DDL statement and SET XACT_ABORT

Post by dmitriy_lyak » Wed, 10 Nov 1999 04:00:00



Hi
I've got a problem, during execution some like folowing in QA

set xact_abort off
exec ('create table t1 (id int not null)')
exec ('create table t1 (id int not null)')
print 'created'

Output (Microsoft SQL Server  7.00 - 7.00.623 (Intel X86) )
Server: Msg 2714, Level 16, State 6, Line 1
There is already an object named 't1' in the database.

Output (Microsoft SQL Server  6.50 - 6.50.201 (Intel X86))
Server: Msg 2714, Level 16, State 1, Line 0
There is already an object named 't1' in the database.
created

Why set xact_abort off don't work in SQL Server 7 for DDL statements?

 
 
 

1. SET XACT_ABORT in 6.5

I have a table which is the target of foriegn key references.   During
the course of a days operations, some elements in this table may become
unreferenced by any other table.   I would like to remove all entries
from this table which are not linked via FK to another table.     Under
7.0 a quick way to do this is to ...

set xact_abort off
delete from <table name>
set xact_abort on

How can I efficiently do this under SQL6.5 (which does not appear to
have xact_abort in its set command).

Thanks
Jim

2. How to convert Char to Datetime

3. Help Help Why XACT_ABORT Always set OFF on 7.0

4. Missing "dbcrtgs" installation package

5. How to SET XACT_ABORT ON for all procedures?

6. Perform a script if a field is modified?

7. set xact_abort

8. SET XACT_ABORT just doesn't work...

9. does set xact_abort off sometimes hang server?

10. How to set XACT_ABORT in user options

11. How to catch error in SQL with SET XACT_ABORT ON

12. finding the setting for XACT_ABORT