Redgate Source Control: Securables from synced database roles getting overwritten

ireminiremin Posts: 4 New member
edited October 10, 2022 11:58AM in SQL Source Control

I have several database roles synced between a test and production server with redgate source control. These are properly connected to their appropriate role members.

Once I make a new deployment to the production server, the permissions that are granted to individual database roles are reset. The connection to the role members, however, stays.So all of the settings here (picture) get deleted.

enter image description here

How can I prevent this from happening? Do Securables have to be synced separately? If so, where?

Best Answer

  • DanCDanC Posts: 639 Gold 5
    Hi @iremin

    Securables are database level objects that can't be committed and checked into SQL Source Control.

    In this case, are you referring to permissions? if you're using SQL Change Automation PowerShell for deployment of these source controlled databases, by default  the following option is enabled "Ignore User Permissions and Role Memberships enabled", if you're assigning permissions directly to users, this will explain the behavior.

    Hope this helps!

    Kind regards

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

Answers

Sign In or Register to comment.