|
Starting from
version 1.95, the Diff allows fine control over comparison and
synchronization of permissions and extended properties. The two are
controlled separately, but in similar ways, that is why they are
shown on the same options page. There are four comparison
modes for each:
|
·
|
Don't load...
Permissions or xprops won't be loaded at all. Accordingly, they
can't take part in comparison and are never scripted. There can be
no dependencies on either xprops or permissions, so turning them
off completely wouldn't make any scripts unusable (as could happen,
for example, if you don't load
statistics). However, if any object is dropped and re-created
during the synchronization, the Diff would be unable to
restore permissions or xprops for it. We recommend that you
only use the "Don't load" setting when you need to minimize loading
time (e.g. when connecting to a remote server via dial-up)
and when you are positively sure the target database doesn't
contain any permissions / xprops worth preserving. |
|
·
|
Ignore changes... / Preserve
XProps... The permissions or xprops are loaded, but not
synchronized. Whenever the Diff has to re-create an object,
it will also restore its permissions and/or xprops as they originally were in the target
database. This is the most logical setting, at least
for the permissions. |
|
·
|
Only compare if user is
present in both DBs / Changed xprops synched... The wording
is different for permissions and for xprops, but the meaning is
very similar. For permissions, if the same user is defined in
both databases, permissions for that user are synchronized. The
Diff won't try to script permissions for the user not defined in
the target DB and it will re-create permissions for the users which
only exist in the target DB. For extended properties, it
means that xprops with the same name (but different values) are
synchronized, but the Diff won't add new xprops to the target and
would re-create, when necessary, those that only exist in the
target. |
|
·
|
Always compare... /
Synchronize all... All permissions / xprops are compared and
synchronized in a regular way. |
The last option to mention
is "Optimize
permissions", which allows not to consider as differences
and not to include in scripts certain types of redundant
permissions. Currently the detected redundancies include:
|
·
|
Granting/denying on column level what is already granted/denied
on object level, |
|
·
|
Granting a particular kind of access (e.g. SELECT) when it is
already implied (e.g. by granted CONTROL) |
There are some more
optimizations that might be worth doing, but that are not implemented in
the current Diff version (1.96):
|
·
|
Granting/denying to a user what is already granted/denying to a
group/role the user belongs to; |
|
·
|
Granting/denying permissions that already exist on the schema
or database level. |
|