SQL Compare - 5.2 - Command Line Question

hparnetthparnett Posts: 5
edited October 18, 2006 5:36AM in SQL Compare Previous Versions
Question - I run the following command at a command prompt with includeidentical = false but all objects in the database appears on the report - I am only interested in seeing any objects which are different.

"c:\program files\red gate\sql bundle 5\sqlcompare" /server1:XXXX1 /server2:XXXX2 /database1:CLIENT1 /database2:CLIENT2 /includeIdentical:false /scriptfile:c:\temp\sync.sql >>c:\temp\output.txt

Am I using the includeidentical setting wrong?

Thanks,
Harley

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Harley,

    I think that the idea behind /includeidentical is that the identical objects do not appear in the report output that you get when you specify the /report option. It doesn't seem to affect the console output when the status of the various objects is written to the console.
  • Thanks for the response........

    From my standpoint, I have lots of databases to compare - I would like to output the console information for all comparisons to a single file - rather than multiple files which have to be individually opened to view the results - and with just those objects noted that are different. If differences are detected, then the GUI version could be used to analyze the differences.

    One other note - when the databases are identical, the software issues an error stating "the databases are either identical or no objects were included in the comparison". A couple of comments - first, which is it - identical or no objects - those are very different situations. Second, identical is not usually an error - my goal is to keep the databases in sync and the error consition is when a developer has installed an object somewhere rather than submitting it for general distribution.

    Overall, SQL Compare is a fantastic tool and well worth the price of admission.

    Cheers,
    Harley

    [/i]
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Harley,

    SQL Compare does notify you that the databases are identical, and it outputs a return code of 63. This can be useful in batch files -- for instance if you have some post processing that you do after synchronizing databases with SQLCOMPARE that you may not want to do if no synchronization took place.

    But it may be useful in the future for it to distinguish between databases that have nothing to compare and databases that are identical. In the first case, you may have inadvertently specified a command line that excluded all of the objects in the database and you would need to take action to fix the command-line arguments.
This discussion has been closed.