Command line compare - ignore windows group users

Nazca_AaronNazca_Aaron Posts: 12
edited October 13, 2008 1:17PM in SQL Compare Previous Versions
I am setting up some batch files to execute schema comparisons on a schedule. I've got everything set properly, but I'm running into one issue regarding the comparison of users that are Windows AD groups.

I am excluding all users and roles from my comparison. This works properly for all SQL users and individual Windows users. However, if the database user is a Windows group, the user is not ignored in the compare, no matter what options I set.

Is there a flag I need to set to specifically exclude these groups? I noticed a similar post regarding this issue with a number of work-arounds, but nothing that would well with a command line compare (I can easily exclude the user via the GUI). I'd rather not reconfigure my permissions on all my SQL Servers to use single users instead of groups, if possible.
I hook up data.

Comments

  • Thanks for your post.

    The windows group user shouldn't be treated any differently to the Windows user or the sql users. I have done a quick test and using /exclude:user and my windows group was successfully excluded from the script.

    The only thing I could think of is that another object is dependant on that windows group, and since include dependencies is one of the default options for a command line task; it will have been included in the script.

    If you do not want to automatically include dependencies then you will need to set the options you do want in the command.

    Let me know if this helps or not.
    Chris
  • Chris, thanks for your reply.

    I did not include "default" in my options switch, and am using /exclude:User. My full command is:

    SQLCompare.exe /project:"<project.scp>" /exclude:User /exclude:Role /exclude:Schema /AllowIdenticalDatabases /options:IgnoreNotForReplication,IgnoreReplicationTriggers,IgnoreUserProperties,IgnoreUsers,IgnoreWhiteSpace,IgnorePermissions,ForceColumnOrder,IgnoreFileGroups /out:"<myoutfile.txt>" /f /verbose /report:"<myreport.html>" /reporttype:Interactive /scriptfile:"<myscriptfile.sql>"

    Is there something I am missing?
    I hook up data.
  • Sorry that the last suggestion didn't help. I'm at a loss to see why the Windows user would be treated any differently to the other users.

    Would you be able to send me a snapshot of the source schema so that I can recreate the problem here?

    You can generate a snapshot using the SQL Compare UI - File >> Export a data source.

    If you could attach the snapshot to an email and send it to [email protected] I will log a ticket for you.
    Chris
Sign In or Register to comment.