Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop the Query Analyzer
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
00503528
Message ID:
00503551
Views:
22
>Hi All,
>
>To update my client's and internal SQL Servers I write Scripts that are run in the Query Analyzer. i.e. ALTER TABLE, CREATE INDEX, etc. (Whether this is a GOOD approach or not is up for debate, but it has been reasonably successful)
>
>However, I am having trouble with error handling. Stored Procedures quit when a RETURN is encountered. QA doesn't stop the script! Is there a command I'm missing? Do I need to create a stored procedure, run it, and drop it? Is there another method I SHOULD be pursuing?
>
>Any help would be appreciated?
>TIA,

There was a thread in the last week about something like this. The only way found was to use RAISEERROR in with a severity level 20 or greater. This will treated as a fatal error that severs the connection thereby killing the script in QA. In other words, the "Nuclear Warhead approach".

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform