Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does a Stored Procedure locks...
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00846364
Message ID:
00846390
Vues:
25
No. Queries acquire locks, stored procedures don't. The only exception would be when the stored procedure was created. SQL Server will use locking as it updates the database catalog to reflect the new stored procedure.

It is usually a good idea to limit the amount of work that is done within a trigger since the work done by the trigger is implicitely part of the transaction.

-Mike

>Hi,
>
>We have a lot of triggers that invoke stored procedures (wich inside has a lot of SELECT statements), and we have some problems of performance. Since we can use (NOLOCK) on SELECT statements to improve performance (although we can loose data consistency), my question is:
>
>Does calling a Stored Procedure LOCKS (besides having SELECT statements inside with NOLOCK)?
>
>
>Thanks in advance.
>
>
>Ricardo Almeida
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform