-1

I am using a script to copy data from a subset of tables in one server to a second server, such that the second server has fewer tables than the original. Data should otherwise be identical.

I recently learned there is a DB compare tool in recent versions of VS, so I installed it and restarted VS. I then pointed the tool to the two servers and ran a table compare. This returned immediately with "0 tables and/or views were compared."

There seemed to be only three steps, select the two databases, select what you want to compare (tables) and then click Finish.

There are no errors, dialogs, warnings or output in Output or Immediate. I know it is connecting to the two DB's because I can pop-up the table list successfully, which I couldn't when I forgot to check the trust cert.

Did I miss something?

2
  • Please add name of the plugin you are using. But usually, such tasks are done by a simple extraction of tables into CSV files and compare them. Or attaching one DB to another as a set of remote tables and doing joins on them. Or using a specialized ETL tools.
    – White Owl
    Commented Jul 2 at 22:31
  • 1
    Do none of your tables have primary keys? Do the tables have same naming (including casing) on both sides? Related SO question stackoverflow.com/questions/31115502/… Commented Jul 3 at 4:56

1 Answer 1

1

So as it turns out this tool is practically useless unless you are comparing two DBs that were created with from the same backup or original scripts. In my case there are fewer tables in the copy and they were created with a simple script that copied just the types.

As such, despite those tables having all the same columns and types, the tool refuses to compare them because the original has things like NOT NULL that are not on some of the copy's columns. This, of course, has no actual effect on the data because the original is enforcing the ref integrity, but if there is any difference at all in the definitions the tool will simply refuse to the compare and fail silently.

Awesome sauce all over this one!

Not the answer you're looking for? Browse other questions tagged or ask your own question.