What are the challenges you face when working across database platforms? Take the survey

Issues with command line SQLCompare

sylviasylvia Posts: 4
edited November 9, 2006 5:38AM in SQL Compare Previous Versions

I'd like to compare 2 databases, ignoring comments, and only returning output if there's something different. I'm having some difficulty getting the output I need. It works well in the UI version, though.

I'm using this command line string:

SQLCompare /database1:DB1 /database2:DB1 /server1:TestServer /username1:testuser /password1:testpassword /server2:OtherServer /options:ignorecomments /exclude:user /exclude:role

When I run this, I get ALL my objects back, all the tables have = =, and all the procedures have <> <>. I assume the == means they're equal, and the <> <> means that they're not.

However, when I run without the /options:ignorecomments option, I get
only 5 of the tables having the <> <>. Doesn't seem like this is working properly - why should more of the objects show up as different when I say ignorecomments?

Two questions:

1. What am I doing wrong - I just want to compare everything, without including comments.

2. How do I get back JUST those objects that are different?



  • Options
    Hi Sylvia,

    I think I have worked out what is happening with your command line options. The way you have set up the options means that your are overiding all the default options (IgnoreFillFactor, IgnoreWhiteSpace, IncludeDependencies, IgnoreFileGroups, IgnoreUserProperties, IgnoreWithElementOrder) and this is what is causing the differences in your database. If you use

    this should solve your first problem.

    The second issue you refer is slightly more tricky as there is no way in the command line at present to filter out identical results at the command prompt. However, if you get the command line to create a report identical results are ignored by default, this may help you get the information you are after.

    I know this isn't quite what you are after, but I will add a request to our system that we add status filtering to the command line for a future release.


    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
Sign In or Register to comment.