How can we help you today? How can we help you today?

SQL Change Automation release task in AzureDevOps

I have a build artifact in azure (from a sql source control repository) and I'd like to apply this artifact to a database.
I'm using the "SQL Change Automation Release" task available in AzureDevOps.
In the task options, I set the "SQL compare options" textbox with "IgnoreCollations,IgnoreUserProperties,IgnoreUsersPermissionsAndRoleMemberships, IgnoreSchemaObjectAuthorization,IgnoreExtendedProperties,IgnorePermissions".
When the release pipeline runs, everything works until the generated script tries to drop users and it fails (i want to exclude Users info).

How can I ignore users?

Thanks.
ManuelSanrepot
0

Comments

2 comments

  • Pete_Ruiz

    Hello @ManuelSanrepot ,


    Thanks for your query regarding SQL Change Automation. You should be able to get around this issue by adding a filter to prevent the users from being affected in your target.


    Please see the documentation below for working with filters in SQL Change Automation:

    https://documentation.red-gate.com/sca/developing-databases/concepts/filtering


    Kind regards,


    Pete Ruiz
    Pete_Ruiz
    0
  • ManuelSanrepot
    Thanks Pete for your answer.

    Finally I set some "exclude" filters in my SourceControl project, so the "SQL Change Automation release task" use them when updating the target database.

    Now I have an other question.  If target database has objects (tables, views, procs, funcs) not in source, will they be deleted? I need to preserve them to avoid data loss. Should I set something to avoid this deleting to ocurr?

    Thanks.
    ManuelSanrepot
    0

Add comment

Please sign in to leave a comment.