Options

Locking setup script for Source Control in "shared development model"

When using SQL Source Control with the "shared development model" does each user have to run the setup script to allow them to lock objects on any database they wish to work on?
On one of our instances, the DBA made initial commits for all databases and then ran the setup script for locking for each database - thinking that would enable locking for all potential developers. Is this NOT the case?
Tagged:

Answers

  • Options
    Hi @Derek_Holland1

    So only one user would need to run the locking script as described in the following document: https://documentation.red-gate.com/soc/common-tasks/lock-an-object/set-up-object-locking

    To set up object locking, you need to run a script on the server. Afterwards, you can lock objects in all databases on the server.

    After you've run the setup script you'd need to right click on any object and "lock this object" once that's been done, if you try to make any changes it will give you a UI alert warning you "User_xxx" has locked this object. 

    So my question would be, is everyone able to see the menu to lock objects when they right click on a table for example, and have any objects been locked?

    Also if you go to the SQL Source Control tab in SSMS for one of your databases, and then go to "Locking" do you see a list of objects?

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

Sign In or Register to comment.