Thursday, August 18, 2011

RedGate SQL Data Compare

  1. Populate your schema with data at a database at SQL Server Management Studio.
  2. Detach the database from Microsoft SQL Server Management Studio. It will end up some place like this:
    C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data
  3. Make a copy of the .mdf and .ldf file.
  4. Reattach the old database and rename it something else.
  5. Attach the new database and get rid of its contents.
  6. Download a trial of Redgate SQL Data Compare 9.0
  7. Install it!
  8. Spin up the app. Compare two databases as shown here and then finally click "Compare Now"
  9. Enter the "Synchronization Wizard" and then with the option for "Create a synchronization script" checked click "Next"
  10. There will be a tab called "Synchronization Script" that holds the SQL you want.

No comments:

Post a Comment