Generate comparison reports

After you run the comparison, you can generate a comparison report to export the results in HTML, Excel, or XML format.

Generate a report

1. On the menu bar, select Comparison > Generate Comparison Report.

Generate Comparison Report

2. In the Comparison Report dialog, select a report format (HTML, Excel, or XML), enter the file name and location for the report, and configure the following options:

  • Append timestamp to the file name – Adds date and time to the file name.
  • View report on the completion – Opens the comparison report after generation.
  • Include – Adds objects to the report:
    • All objects
    • Filtered objects
    • Objects with differences
    • Objects selected for synchronization

Comparison Report

3. Configure additional options for HTML and XML formats. For more information, see HTML report and XML report.

4. Click Generate.

HTML report

An HTML report is interactive: you can click an object to inspect the differences in the object creation scripts.

When you generate an HTML report, you can also configure the following:

  • Options – Includes the following information in the report:
    • Compare and sync options
    • Warnings
    • Deployment script
  • Script Diffs Style – Highlights the differences in the object creation scripts in the specified style:
    • Removed-added lines – Removed lines are highlighted in red, added lines are highlighted in green.
    • Crossed out words – Removed words are struck through and highlighted in red.

The following sections explain what the HTML report contains.

Report header

The report header displays the following information:

  • The date of report creation
  • Expand all – A control to open all expandable items.
  • Collapse all – A control to close the expanded items.
  • The source and target databases and the connections used for schema comparison.

Changes section

The Changes section displays objects grouped into the following categories:

  • Added – Objects that exist in the target but not in the source.
  • Removed – Objects that exist in the source but not in the target.
  • Modified – Objects that exist in both the source and the target but differ.
  • Identical – Objects that are the same in the source and the target.
  • Inconsistent – Objects with properties not supported by the target server.
  • Unknown – Objects for which Schema Compare couldn’t retrieve metadata.

The number of objects in each category appears next to the category name.

To view only the objects in a category, click the category.

To view the DDL script of an object, click the object.

HTML Report

Warnings section

The Warnings section displays warnings or informational messages that require your attention. For more information about warnings, see Review the action plan and warnings.

HTML Report Warnings Section

Script section

The Script section displays a T-SQL script that you can run against the target database to synchronize it with the source. For more information about the script, see The specifics of synchronization scripts.

HTML Report Script Section

Options section

The Options section is divided into two groups:

  • Comparison – Displays the comparison options. For more information about them, see Configure comparison options.
  • Synchronization – Displays the synchronization options. For more information about them, see Configure synchronization options.

HTML Report Options Section

Sample HTML diff reports

You can view sample interactive HTML comparison reports demonstrating the available ways of highlighting schema differences:

  • HTML diff report with removed-added lines

  • HTML diff report with crossed out words

Excel report

An Excel report displays the report title, generation date, source and target databases and servers, a status summary, and the comparison results grouped by status.

An Excel report doesn’t show comparison options.

Excel Report

XML report

An XML report displays the report title, generation date, source and target databases and servers, a status summary, and comparison results.

Also, when you generate an XML report, you can select Compare and sync options to include information about applied comparison and synchronization options.

XML Report

Excel XML spreadsheet

Schema Compare also lets you create a comparison report in XML Spreadsheet 2003 format.

To create a report in XML Spreadsheet 2003 format:

1. In the Comparison Report dialog, select the XML format.

2. Select Use XML Spreadsheet 2003 file format.

Create XML to Excel Report

3. Click Generate.

XML to Excel Report

Generate a report from the command line

1. Open Command Prompt.

2. Enter the path to the schemacompare.com file located in the dbForge Schema Compare for SQL Server installation folder on your computer, then press Spacebar.

3. Enter the /schemacompare command to start a schema comparison, followed by the necessary arguments and their parameters.

Tip

To get quick help on the arguments available in the command line, run the following command:

schemacompare.com /?

4. Enter the source and target connection strings using the /source and /target arguments.

5. To generate and save a log file, enter the file name and location using the /log argument.

6. To generate and save a comparison report file, enter the file name and location using the /report argument.

For more information and examples, see Automate schema comparison and synchronization from the command line.