Question about objects that cannot be compared

menachemmenachem Posts: 2
I have copied one database to another, via the Enterprise Manager, by performing a Backup of the source database, and then immediately performing a Restore from that backup to the target database. Now the two databases should be identical. However, when I perform the Data Compare, many objects are listed as Cannot Be Compared. How can this be if the databases are identical?

Thanks.

Comments

  • Thanks for your message.

    When SQL Data Compare runs a comparison, it will automatically try to match up and compare objects based on the primary key that they have assigned. If the object in question does not have a primary key assigned, then SQL Data Compare will not know automatically what column to use as the key for comparison. This will show up in the comparison results as objects that could not be compared.

    If you edit the comparison project and view the Tables & Views tab, look for any objects that have 'not set' in the comparison key column. These are all the objects that could not be automatically compared without manually choosing the comparison key. After you have chosen the comparison key, the objects will be compared in the project.

    Once you have run the comparison, the manually assigned keys will be remembered for future executions.

    I hope this answers your question.
    Chris
Sign In or Register to comment.