command line error when db's are identical

tfeldmantfeldman Posts: 6
edited February 13, 2008 11:44AM in SQL Compare Previous Versions
The command-line execution is apparently designed to return an error code (Error: The databases are identical or no objects have been included in the comparison) if the databases being compared are identical. But in my case the databases are supposed to be identical! The comparison is being executed in order to verify that the db's are identical. So I don't want an error code returned to the calling program (in this case a SQL job).

Comments

  • Hi there,

    Sorry, about your problem, my colleage and I have just been trying to work around it, but cannot come up with a way to do this as a SQL Server job. Now, I think we really need to add an "don't raise an error on identical" switch to the command lines. I have added a request for this, I cannot promise it will be done in the next release, but we will try to fit it in.

    Regards,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • I had a similar situation and came up with a workaround.

    On the first step of my sync job, I execute the following:
    use destination_database
    go
    create table fake_table_for_redgate
    (
    fake_column int )
    go
    

    That way when the sync runs, it will always find a destination table that doesn't have a matching source table and then drop the table. Obviously not the ideal way to do things, but it works.
  • This bug is fixed in the currently released version of Compare (6.2) - there is now an /allowIdenticalDatabases option (alias: /aid) for the command line which will produce a report instead of an error for identical databases.
    Software Developer
    Redgate Software
Sign In or Register to comment.