Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop the Query Analyzer
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
00503528
Message ID:
00503551
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform