Database deployment with IgnoreUsers still drops users...

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

Database deployment with IgnoreUsers still drops users...

Postby matthoneycutt » Thu Apr 10, 2014 12:47 pm

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?
matthoneycutt
 
Posts: 7
Joined: Mon Apr 07, 2014 4:48 pm

Postby james.billings » Mon Apr 14, 2014 5:42 pm

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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby Totu » Mon Apr 21, 2014 11:07 am

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
Totu
 
Posts: 11
Joined: Mon Apr 07, 2014 2:38 pm

Postby james.billings » Mon Apr 21, 2014 11:23 am

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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby Totu » Mon Apr 21, 2014 1:31 pm

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
Totu
 
Posts: 11
Joined: Mon Apr 07, 2014 2:38 pm

Re: Database deployment with IgnoreUsers still drops users..

Postby chirayu » Fri Sep 26, 2014 3:12 pm

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
chirayu
 
Posts: 68
Joined: Mon Sep 17, 2012 5:48 pm


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests