Script Object permissions before deploy and assign it after deploy


we have the problem that our Object permissions are different (Domain User) in the development database and the production database - so if there is change in a table which results in re-creation of a table the destination permssion are lost. It would be usefull to have an option to script all permissions of destination database before deploy and re-assign that permissions after deploy to have the same permssion again also if there is a table change...



  • Thanks for reaching out to us regarding this.

    Within the SQL Compare comparison options there is an option to toggle between ignoring user' permissions and not ignoring them. Does this option help you in achieving what you need to?

    Please let me know if this does not answer your question so that we can further advise you on this.
    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
  • madrianrmadrianr Posts: 4 Bronze 2
    No - I ignore it like that way because the permissions in the development DB are different that in the production DB - what I wanted to have is the possibility to "save" the permssions before I deploy the changes and re-assign it after deployment...

  • Sorry for the delay in responding to you on this.

    What you are trying to achieve should be the expected behavior of SQL Compare (SQL Compare should change the schema but leave permissions unchanged). Given that, I think it would be good for me to attempt to reproduce the issue you are seeing, it would be helpful for me to know the exact steps you took. Would you mind listing these out please?

    Once I have replicated this issue I will look to engage with our development team on this.

    Also just a thought: you could apply permissions to roles instead of directly to users, in conjunction with the 'Ignore User Permissions' and 'Role Memberships' options.

    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.