Ignore Roles
johnfnz
Posts: 13
Have had a look through the forums but can't find an answer to this one.
In my sync I want to completely ignore roles.
I am working from the command line. I have options:
set and am also specifying:
and yet in the output from sqlcompare I still see:
Can anyone suggest what I am doing wrong here?
We are dealing with the DB roles as part of a separate process so don't really care about differences (or equalities) in them during this sync.
In my sync I want to completely ignore roles.
I am working from the command line. I have options:
IgnoreUsersPermissionsAndRoleMemberships,IgnoreUsers
set and am also specifying:
/exclude=Role:.*"
/exclude=User:.*"
and yet in the output from sqlcompare I still see:
Role db_access******* == ==
Role db_security******* == ==
Role db_backupoperator == ==
Role db_denydatareader == ==
Role db_denydatawriter == ==
Role public == ==
Can anyone suggest what I am doing wrong here?
We are dealing with the DB roles as part of a separate process so don't really care about differences (or equalities) in them during this sync.
Comments
I would imagine the problem is that another object in your project had a dependency on the role and it's being brought back in.
By default, we bring back dependent objects, as they're probably required or it's likely the script will fail or it will leave your database in an inconsistent state.
If you want to ignore dependencies, you can use the option 'IgnoreDependencies'
I hope this helps.
doesn't seem to exist in my version. Am running 10.2
It's IncludeDependencies and that's one of the default options, so your original command should have worked :S
Can you post your original command, the options switch should have a : rather than an = sign. e.g. /options:option1,option2
The command is being built programmatically - I'll dig it out and post...
/include:View /exclude:Role
This'll take time as I'll need to get approval to get new software installed.
<options>IgnorePermissions,IgnoreFillFactor,IgnoreUserProperties,ForceColumnOrder,IgnoreStatistics,IgnoreUsers,IgnoreReplicationTriggers,IgnoreExtendedProperties,IgnoreFileGroups,IgnoreWhiteSpace</options>
...
<exclude>Schema</exclude>
<exclude>Role</exclude>
<exclude>User</exclude>
...
<reportAllObjectsWithDifferences />
report shows
Role db_owner == ==
Role db_accessadmin == ==
Role db_datareader == ==
Role db_datawriter == ==
Role db_ddladmin == ==
Role db_securityadmin == ==
Role db_backupoperator == ==
Role db_denydatareader == ==
Role db_denydatawriter == ==
Role public == ==
Schema db_owner == ==
Schema db_accessadmin == ==
Schema db_datawriter == ==
Schema db_ddladmin == ==
Schema db_securityadmin == ==
Schema db_backupoperator == ==
Schema db_denydatareader == ==
Schema db_denydatawriter == ==
Schema INFORMATION_SCHEMA == ==
Schema dbo == ==
Schema guest == ==
Schema sys == ==
Redgate Software
I don't think there's any way to combine include/exclude like this and actually control what happens. It's recommended to use a filter rather than exclude now anyway (so create a filter excluding roles in the GUI and save it to a .scpf file, then reference this with the /filter switch).
Even doing this, include:identical "wins", however there's a new switch now which omits the need for that: /assertidentical.
Using that switch will stop the error occurring on identical DB's but also not include identical objects in the output.
Redgate Software
If I remove include:idential then I just get the
error.
I'll try the filer.