comparing mytable and mytable_new in the same database WITH COMMAND LINE (CLI)?

We are trying to compare the schema on a before/after tables. Right now we have mytable_a and mytable_a_new,, but will be "flipping" the table names so that mytable_a_new becomes mytable_a, and the existing mytable_a becomes mytable_a_old.

In the GUI, comparing these two is pretty straightforward, using mapping.

However, we have multiple tables in the database (mytable_b and mytable_b_new, etc, etc), and across several servers. So I want to be able to run a script that will bang against each combo and drop a report. I can't seem to find a way of doing this.

I believe in the past we'd built something that created an XML file that SQL Compare would then use, but I'd think this is a common enough scenario that it's standard these days (compare two tables in the same database with different names).

Any idea? Anybody? Bueller?
Tagged:

Best Answer

  • sam.blackburnsam.blackburn Posts: 224 Gold 1
    Accepted Answer
    The XML file you remember using is probably a SQL Compare project, which you can save using the SQL Compare UI and load using the /project switch on the command line. The project file saves selections as well as mappings, so it is worth making sure the table you want to compare is ticked in the UI before saving the project.
    Software Developer
    Redgate Software
Sign In or Register to comment.