Can the Output of SQLCompare be customized?

skasamskasam Posts: 2
edited July 26, 2005 8:02AM in SQL Compare Previous Versions
Hi,
I am trying to use the command line interface sqlcompare.exe. It currently outputs the objects that are same, that are existing on one db than another, objects that are different.

Example:
Name                   DB1        DB2 
-------------------   ----------  ---------
[dbo].[authors]     <>           <>  
[dbo].[discounts]   >>    
[dbo].[abc]	          <<
[dbo].[abc]           ==           ==



My question is can I have the output of the sqlcompare.exe to be as follows (Meaning just list objects that are different):
Name                   DB1        DB2 
-------------------   ----------  ---------
[dbo].[authors]     <>           <>  


If that is not possible, how about having some kind of wording in the output saying there are objects that are different and then list what ever you want to put as output.

Thanks,
-- Sri

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Sri,

    There aren't any options in the command line SQLCOMPARE.exe to change the information written to the console. You could either use the SQL Toolkit to write your own command-line application, or you could intercept and modify the output, or you could let SQLCOMPARE write the output to a file and then use a clever bit of VBScript to remove all lines that contain '=='.

    For instance, this DOS command will print only the different/missing/additional objects to the console:
    SQLCOMPARE /db1:database1 /db2:database2 | find /V "=="
    

    You could also use this to write your report to disk using redirection like this:
    SQLCOMPARE /db1:database1 /db2:database2 | find /V "==" > report.txt
    
This discussion has been closed.