How to Compare Same Tables with Different Names
JohnAJorgensen
Posts: 2
I have made a backup of a table appending a datatime stamp to the table name and would like to compare the original table to the backup. Can this be done? (e.g. compare table1 with table1_20081114)
Thanks
John
Thanks
John
Comments
Unfortunately what you wish to achieve canot be met comparing a live database to a backup file. Due to the fact that in step 9 of the procedure, you cannot manually set a comparison key, when using a backup file in a comparison.
However what you are seeking can be achieved using two live databases as the data sources
Below are the steps you need to take to achieve your goal using two live databases as the data sources:
1. Create a new or open an existing SQL Data Compare project.
2. Select the two live databases as the data sources.
3. Select the Tables & views tab. Allow time for the application to retrieve the information.
4. Deselect all the objects so that only the two tables you wish to compare are selected.
5. Select the Remap Objects tab.
6. Unmap using your example, Table 1 and Table1_20081114.
7. Depending how you wish to proceeed. Either Map Table1 to Table1_20081114 or the other way around, Table1_20081114 to Table1.
8. Select the Tables & Views tab.
9. Ensure that the new mapped tables have a Comparison Key. If NOT SET is in the Comparison Key column, click NOT SET and choose a comparison key for the comparison.
10. Click the Compare Now button.
Hopefully SQL Data Compare will compare and match rows of data between the two tables.
Hope the above helps.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com