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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 RollBack transaction for DDL Statements EVEN !!!!

Author  Topic 

hari om
Starting Member

1 Post

Posted - 2008-07-07 : 08:09:00
Hi

I am shashanka.
In SQL Server 2005/2000
I have problem with RollBack transaction.
Generally DDL Statements cant be rolled back.
but in this case :
Begin Transaction
Drop table EMP
rollBack


is working Fine.
Which shouldnot happen.
In the above query (EMP is an existing table with
some junk data).
Can u please tell me why is it rolling back even
for DDL; which should only satisfy the DML Statements.

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-07-07 : 09:32:15
DDL statements can be rolled back in SQL server. What you are seeing is expected and documented behaviour.

It's Oracle that auto-commits DDL statement (from what I've read, that is)

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -