SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

chih
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
rollback

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?

cheers

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

dataguru1971
Flowing Fount of Yak Knowledge

USA
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.

No..it 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  
 New 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.05 seconds. Powered By: Snitz Forums 2000