Database deployment with IgnoreUsers still drops users...

matthoneycuttmatthoneycutt Posts: 11
edited September 26, 2014 10:12AM in Deployment Manager
My deployment has RedGateDatabaseOptionsIgnoreUsers=true, but about every other release is still dropping users from the target database. How can I tell Deployment Manager to completely ignore users when applying a release?

Comments

  • The ignore users doesn't actually ignore users in the way you'd probably think it does...
    It actually affects how explicit permissions on objects are deployed:
    When role-based security is used, object permissions are assigned to roles, not users. If this option is set to true, Deployment Manager only deploys object permissions for roles, and members of roles that are themselves roles. Users' permissions and role memberships are ignored.

    If you want to exclude users altogether, you'd really need to look at using a Filter file in your package.
    If you're using our SQL Source Control you can create a filter and check it into your repository as described here
    You can also create a filter in SQL Compare if you use that - making sure you save the file as "Filter.scpf", and then include it in your package.
    Systems Software Engineer

    Redgate Software

  • Hi James,

    I have a similar problem.
    I am not using any filters and using default settings for the RGDM.

    The problem in short is that role members are ignored when I want to deploy the database. I have looked up the SQL Compare default settings and it doesn't say it is set to true by default.

    I have set it explicitly to false and it fixed my problem. The question remains: why is it not using the default settings for SQL Compare?

    Cheers,
    Balint

    EDIT: I looked up the RGDM documentation and indeed it is set to true by default. Apologies for that. Additional question: is there a way to set the defaults other than per-project? We are using an alternate method to persist security objects and for that we need the option to be set to false at all of our projects.
    Bálint Bartha, Skyscanner
  • James BJames B Posts: 1,124 Silver 4
    I think that DM had the option set to True because in many cases DM is used to deploy to various different production DB's where you may want to leave users alone, rather than deploying changes to them.
    In the case of SQL Compare, we tend to minimise the amount of default "ignore" options that are set so the majority of differences are available for deployment.
    It basically comes down to a difference in the intended usage.
    Systems Software Engineer

    Redgate Software

  • Hi James,

    Thanks for the info.
    Now that I think, it makes sense to have it that way. I think it is our alternative way that made the difference in the deployment.


    Thanks,
    Balint
    Bálint Bartha, Skyscanner
  • This is a bit late, but I am posting it anyway for people who google this error.

    RedGateDatabaseOptionsIgnoreUsers does not actually ignore users. It has been badly named. According to the documentation, this is what it does:
    When role-based security is used, object permissions are assigned to roles, not users. If this option is set to true, Deployment Manager only deploys object permissions for roles, and members of roles that are themselves roles. Users' permissions and role memberships are ignored.

    To really ignore users, you will have to create a filter file in your database package. Those filter rules will then be respected when Deployment Manager does it deployments. Here is the relevant documentation: http://documentation.red-gate.com/displ ... deployment

    There is a filter rule to do with filtering users, I have not used it myself, but it might be what you are looking for! Thanks!

    Chirayu
    Chirayu Shishodiya
    Software Engineer - Deployment Manager
    Red Gate
Sign In or Register to comment.