Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 will Stored procedure rollback if it fails?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

154 Posts

Posted - 03/05/2008 :  20:20:30  Show Profile  Reply with Quote
Hi everyone,

I don't specify the following statements in SP.
begin transaction
commit transaction

In sp, there are a lot of insert and update. If i execute SP and stop it in half way. will it rollback all update and insert statement? also, will it rollback if it fails?


Edited by - chih on 03/05/2008 20:21:42

Flowing Fount of Yak Knowledge

1464 Posts

Posted - 03/05/2008 :  20:41:22  Show Profile  Send dataguru1971 an AOL message  Send dataguru1971 a Yahoo! Message  Reply with Quote
THat depends largely on what the procedure is doing, and where in the procedure it is. will not rollback already completed inserts and deletes prior to killing it or stopping the procedure's execution.

Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000