Why SQL Compare does not remember my settings?
AlexK
Posts: 5
Every time I compare my development database against a copy of production, the roles are always checked, even if I unchecked roles the previous time. This is annoying: roles in production have some logins which I do not reflect in my development database. I must uncheck roles every time, so the synchronization script will not remove logins from roles. This is error-prone: once I can forget to uncheck, and the sync script will drop logins in production. Am I missing something?
Comments
Redgate Software
1) The version number in Help->About on the instance of Compare you're using
2) Exactly what procedure you follow between sessions of Compare (i.e. how you open the project, what else you do other than unchecking the roles, whether you synchronize from within Compare, whether you recompare afterwards). Does the problem occur if you just open the project, uncheck the roles, close Compare, reopen Compare, and open the project again?
3) Are these roles the standard built-in roles (db_accessadmin etc)? Is there anything special about the roles?
Redgate Software
I just reproduced it again.
I started SQL Compare, selected an existing project, and again the standard roles such as db_owner are unchecked as they should, but all the roles which I created, such as DW_Reader, are checked again. I unchecked the roles, ran synchronization wizard, and closed the app. When I reopened it like 10 seconds later, all the roles that I created were checked again.
I am not sure in which scenarios are most of your users using SQL Compare, but when we compare our development databases against copies of our production ones, we never synchronize user-defined roles, that means we always override the defaults.
I'm leaving for PASS in Denver, so the next time I'll be able to reply might be next Monday.
(Have you tried opening the Filter Object pane and unchecking 'Role' from there? I don't know what is making the checkbox statuses not stick, so it's possible that this setting might stay set, which would give you a workaround.)
A couple more troubleshooting ideas:
Is there anything which might be preventing Compare from saving the project file to disk on program exit?
Are the roles still unchecked after the recomparison that occurs when you finish the synchronization wizard?
Can you create new projects and have them persist successfully?
Redgate Software
I think I see the problem. SQL Compare projects remember what you did i.e. checked a particular table. When you reload the project the actions are replayed. By default any new objects will appear as checked.
To achieve what you are looking for you should group by object type and then right click the 'Roles' group and use 'Exclude All Object in this Group'
This will ensure that no roles are selected even if they are new.
I'm sorry it's a little convoluted :oops:
Tom Harris
Red Gate Software