Solved

RAISEERROR In SQL Server Stored Procedures

Posted on 2013-06-23
1
405 Views
Last Modified: 2013-07-01
If I raise an Error as

RAISERROR 500001 ' Status change failed: There are already at least 1 server out of rotation'        
 RETURN      


If this raiserror is executed within a stored procedure will this automatically fail the procedure


Thanks In Advance
0
Comment
Question by:VitaminD
1 Comment
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 500 total points
ID: 39269958
use SET XACT_ABORT ON to make sure the transaction is stopped and rolled back in the event of a RAISERROR...More info

http://msdn.microsoft.com/en-us/library/ms188792.aspx

Hope this helps.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
check the deletion of SQL job on who delete/disable it 12 29
SQL Error in WHERE Clause 5 39
SQL Login 17 38
SSRS Dynamic Column Names - Last 8 Weeks 3 5
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now