Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does a Stored Procedure locks...
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00846364
Message ID:
00846390
Views:
24
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
Previous
Reply
Map
View

Click here to load this message in the networking platform