Request a lock before performing an action

  • 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 FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply