Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Request a lock before performing an action Expand / Collapse
Author
Message
Posted Monday, August 6, 2012 9:13 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 3:04 PM
Points: 3,459, Visits: 1,769
Is there a way in SQL 2008+ to request a lock on a SQL object before attempting to modify it? For example if I was writing a piece of code to dynamically update a stored procedure and I want to lock the stored procedure before doing the alter.

Thanks
Kenneth


Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1340980
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse