Drift Handling in ReadyRoll

Ko1Ko1 Posts: 1
edited June 22, 2017 8:10PM in ReadyRoll
We are using ready roll, configured auto deploy in all the environments. In the sqlserver development environment we added a new user and that user is not in my local databases. When we deploy a drift is detected for the new user is available in the development server.

In our environments we will have different user roles for each environments like app_user_dev, app_user_test, app_user_uat. So we like to avoid the drift detection for the user and roles .

I tried <ExcludeObjectsFromImport> in the sqlproject. No luck !

How to exclude users and roles from drift detection ?

Any help will be appreciated.
Tagged:

Comments

  • dnlnlndnlnln Posts: 234 Gold 2
    edited June 28, 2017 8:21AM
    Apologies for the delay in replying. I've done a bit of investigation and found that the following project-level property might be what you're after: SyncOptionIgnoreUsersPermissionsAndRoleMemberships (set to True)

    In order to implement this, you can either add it as a property to your sqlproj file, which will prevent the role memberships being scripted both at development time (i.e. when using the ReadyRoll tool-window to generate scripts) and also during drift detection:
    <PropertyGroup>
    <SyncOptionIgnoreUsersPermissionsAndRoleMemberships>True</SyncOptionIgnoreUsersPermissionsAndRoleMemberships>
    </PropertyGroup>

    If you would like the role memberships to be excluded from drift detection only, you can specify the property on the command line, e.g.:
    MSBuild MyProject.sqlproj
    /p:ShadowServer=SERVERNAME
    /p:TargetServer=SERVERNAME
    /p:SyncOptionIgnoreUsersPermissionsAndRoleMemberships=True

    I hope this helps. Any questions or issues please let me know
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.