SQL Compare

Latest version: 10.0

SQL Compare

Notes & articles

Introducing SQL Compare 8: FAQs for SQL Compare 7 users

If you are familiar with SQL Compare 7, you may have questions about version 8. In addition to usability enhancements and bug fixes, there are significant changes to the Synchronization Wizard, filters, and the way SQL Compare handles projects.

This article addresses some questions about the differences between SQL Compare 8 and the previous version (7.1):

Where are my projects?

In SQL Compare 8, projects are accessed using the Projects dialog box. This is similar to Comparison Projects dialog box in SQL Compare 7.

On the toolbar, click (Open Project) to display the Projects dialog box:

The Projects dialog box shows details of your projects.

You can edit or compare these projects, or create a new project.

Can I use my SQL Compare 7 project in SQL Compare 8?

You can open a SQL Compare 7, 6, or 5 project in version 8. Projects from earlier versions are not supported.

You cannot open a SQL Compare 8 project in SQL Compare 7, or in earlier versions.

If you open and save a project in SQL Compare 8, it is converted to version 8 and cannot be opened in earlier versions.

How do I save a project?

In SQL Compare 8 projects are not saved automatically; in SQL Compare 7 they were.

To save a project, on the Project Configuration dialog box click Save. Alternatively, you can save a project when you are reviewing its comparison results. To do this, on the File menu click Save Project.

If there are unsaved changes in the current project, you will be prompted to save when you create a new project, open another project, or when you close the application.

How do I copy or clone a project?

SQL Compare 8 no longer has the Clone button that was present in SQL Compare 7.

To make a copy of a project, on the Projects dialog box, select the project, right click, and select Create Clone.

Alternatively, open the project that you want to copy, and on the Project Configuration dialog box, click Save As.

To copy a project when you are reviewing the comparison results, on the File menu, click Save Project As.

How has filtering changed?

SQL Compare 8 introduces the ability to create custom filters. In SQL Compare 7, you could only filter by object type.

You can use filters to define which objects are displayed in the Results pane. For example, you may be interested in only tables, or in only some of the stored procedures owned by a specific schema. You can set up a filter to show you only the objects matching these conditions.

You can set up a filter for object types, and edit the filter rules to restrict which specific objects are included in or excluded from the Results pane.

The default filter is Nothing Excluded. If you edit this filter, Custom* is shown in the Filter box. An asterisk is displayed next to the name of any filter you edit, to show that there are unsaved changes.

You can save your filters for use in multiple projects. To choose a different filter, in the Filter box select the filter you want to use; if the filter is not listed, select Open filter from file and browse to the filter.

How do I create custom filters?

The ability to create custom filters is a new feature in SQL Compare 8.

You can define which object types the filter includes in the comparison results using the object type check boxes in the Filter pane.

You can also create rules to control the specific objects that a filter includes or excludes. To edit the filter rules:

On the Filter pane, click Edit Filter Rules.

The Edit Filter Rules dialog box is displayed:

You can select individual object types or All object types in all schemas, and edit the rules applying to those objects.

When you create a filter rule, its conditions are displayed under the name of any object types it applies to.

To edit the filter rule for an object type, move the mouse pointer over it and click the (Edit) button that becomes available:

To clear the filter rule for an object type, move the mouse pointer over it and click the (Clear) button that becomes available.

You can clear all current filter rules by selecting the filter Nothing Excluded from the Filter box.

Do filters affect synchronization?

The current filter affects which objects you can select for synchronization:

  • When you use the filter to exclude an object or object type, it is removed from the Results pane and cannot be selected for synchronization.
  • If you select an object for synchronization and later set up a filter that excludes it, the object is not synchronized.

Objects excluded by the filter are only included in the synchronization as dependencies. If an excluded object is referenced by an object you selected for synchronization, you will be notified of this dependency, and can choose to synchronize the affected object on the Review Dependencies page of the Synchronization Wizard.

How has Find changed?

In SQL Compare 8, using the Find box does not hide objects as it did in SQL Compare 7.

To locate objects, type the search text in the Find box. As you type each character, objects are grouped by whether they match or do not match what you type:

Note that the search is not case-sensitive.

To clear the Find box click the button. When you clear the find text, the objects are displayed in the grouping you last used.

What's changed in the Synchronization Wizard?

In SQL Compare 8, the Synchronization Wizard has fewer steps and more flexibility than in SQL Compare 7. It is now possible to:

  • choose to save a synchronization script directly from the wizard, or perform the synchronization using SQL Compare
  • choose to create a schema snapshot before synchronization

    To create a schema snapshot in SQL Compare 7 it was necessary to select Export a Data Source... from the File menu before launching the Synchronization Wizard; in SQL Compare 8 you can also create a snapshot from within the wizard.

  • choose to perform a full backup before synchronization

    In SQL Compare 7 it was necessary to back up independently using SQL Server native backups or Red Gate SQL Backup.

    If you choose the option to back up before synchronization, the backup is performed at the end of the wizard, immediately before the data sources are synchronized.

In SQL Compare 8, the Synchronization Wizard has the following steps:

  1. Choose synchronization method.

    Selecting Create a synchronization script allows you to save the script or open it in your default SQL editor.

    Selecting Synchronize using SQL Compare runs the synchronization script from SQL Compare.

  2. Review dependencies.

    View a list of the objects that reference or are referenced by the objects you have chosen to synchronize. You can choose to also synchronize these objects.

  3. Review script.

    View the synchronization script, a summary of the modifications made by the script, and any warnings about unexpected behavior that may occur when you synchronize the data sources. You can save a copy of the synchronization script on this page.

How do I export a data source?

In SQL Compare 8, you have the option to create a snapshot or a scripts folder. This replaces the Export A Data Source dialog box in SQL Compare 7.

How do I create a snapshot?

To create a new SQL Compare snapshot, on the File menu, select Create Snapshot.

The Create New Snapshot dialog box is displayed:

Under Data source details, specify the details of the source for the snapshot. You can create a snapshot from a database, backup, scripts folder, or another snapshot.

Under Snapshot creation properties, specify a name and location for the snapshot.

SQL Compare automatically detects the case sensitivity of the data source. If you want to override this, clear the Auto detect case sensitivity check box, and select the Treat items as case sensitive check box if required.

By default, SQL Compare decrypts text objects in SQL Server 2008 and SQL Server 2005 databases that were created using the WITH ENCRYPTION option. When comparing large databases, selecting this option can result in slower performance.

Note that:

  • when the source is a snapshot, the case sensitivity and decryption options are not available
  • when the source is a scripts folder, the decryption option is not available
  • you can also create a snapshot using SQL Snapper

SQL Snapper is a free tool that creates SQL Compare snapshots from SQL Server databases. You can download SQL Snapper from the Red Gate Labs website.

How do I create a scripts folder?

To create a new scripts folder, on the File menu, select Create Scripts Folder.

The Create New Scripts Folder dialog box is displayed:

Under Data source details, specify the details of the source for the scripts folder. You can create a scripts folder from a database, backup, snapshot, or another scripts folder.

Under Scripts folder properties, specify a name and location for the scripts folder.

SQL Compare automatically detects the case sensitivity of the data source. If you want to override this, clear the Auto detect case sensitivity check box, and select the Treat items as case sensitive check box if required.

By default, SQL Compare decrypts text objects in SQL Server 2008 and SQL Server 2005 databases that were created using the WITH ENCRYPTION option. When comparing large databases, selecting this option can result in slower performance.

Note that:

  • when the source is a snapshot, the case sensitivity and decryption options are not available
  • when the source is a scripts folder, the decryption option is not available

Can I use my own scripts?

You can also use your own object creation scripts as a data source. SQL Compare will determine any object dependencies and read the scripts in the correct order.

What's changed in the command line interface?

In the SQL Compare 8 command line interface there are the following changes from SQL Compare 7:

/ignoreParserErrors

/ignoreParserErrors is a new switch in SQL Compare 8.

If SQL Compare encounters any high level errors when parsing a scripts folder, it will exit with an error code of 62.

Use /ignoreParserErrors to force SQL Compare to continue without exiting.

/include and /exclude

In SQL Compare 8:

  • /include and /exclude have new arguments
  • /include, /exclude, and /project are mutually exclusive

Arguments:

  • Additional

includes only those objects that are not present in the source

  • Missing

includes only those objects that are not present in the target

  • Different

includes only those objects that are present in both data sources, but are different.

  • User specified

includes the specific objects you specify with a regular expression

/project

In SQL Compare 8, when you use /project, any filters used in the specified project are applied.

This is useful, for example, as you cannot choose or create a custom filter from the command line, and specifying complex object selections using a regular expression can be unwieldy.

Note that:

  • When you use a project, all objects that were selected for comparison when you saved the project are automatically included.
  • When you use the command line, your project option selections are ignored and the defaults are used. Use /options to specify any additional options you want to use with a command line project.
  • If you want to include or exclude objects from an existing project, you must modify your selection using the graphical user interface.

You cannot use the /include and /exclude switches with /project.

/scriptfile

In SQL Compare 8, you can use /scriptfile when the target is a database, scripts folder, snapshot, or a backup.

Getting more information

Was this article helpful?

Search support
Forums
Visit the SQL Compare forum.

SQL Compare

all SQL products

all products