Options

Command line sync keeps wiping out my User

david_montgomerydavid_montgomery Posts: 3
edited July 21, 2011 3:30PM in SQL Compare Previous Versions
Hi,

I'm trying to get an automated schema synchronization to run through my CI environment, and MOST of it is working flawlessly.

However, I want to preserve the existing users and permissions on the target database, and performing the sync deletes the existing users.

These are the command line options used, which I *think* should preserve my user logins, but aren't:
SQLCompare.exe 
/scr1:MySchema
/server2:myserver 
/db2:Some_DB 
/Sync 
/Include:identical
/Options:default,IgnorePermissions,IgnoreUserProperties,IgnoreUsers /Report:DiffReport.html 
/ReportType:Interactive 
/ScriptFile:SyncScript.sql 
/Force 
/Verbose

If it makes any difference, the user logins that are being deleted are domain users.

Thanks,

David

Comments

  • Options
    I have a similar problem where I need to exclude syncing of a specific type of object.

    The examples use the /exclude switch and mention a table setting for it (/exclude:table) which excludes all tables. Are there any settings for other objects? If so is there a complete list somewhere?
  • Options
    I think I may have solved it, or at least my problem.

    My problem was that my live system had different users to my dev systems and role members were thus different. All permissions on objects were set to roles. The default settings were trying to remove the extra users and remove them from the roles.

    The following switches allow me to do this:

    SQLCompare.exe
    /src1:<folder path>
    /server2:myserver
    /db2:some_db
    /options:default,IgnoreUsers
    /exclude:Users
    /scriptfile:myscript.sql

    The ones I changed to get this to work properly are /exclude and /options.

    Hope that helps!
  • Options
    Hi Rob,

    You're right. Using the /Exclude:Users did the trick!

    Thank you,

    David
Sign In or Register to comment.