The SQL Data Compare API Submit feedback on this topic   
Getting Started with the SQL Data Compare API

Glossary Item Box


Note: This documentation applies to version 5.4 of the SQL Data Compare API. Documentation for version 6.0 is in preparation.


The SQL Toolkit™ provides an Application Program Interface that enables you to automate SQL Data Compare™. Online help and sample projects are provided to help you to use the toolkit.

You can use the SQL Data Compare API to synchronize multiple databases, or upgrade your customers' databases without manual intervention.

You can use the API if you are familiar with programming in C#, Visual Basic .NET, or any other .NET language. The engines are implemented as .NET assemblies. You can reference them from Visual Studio .NET or the development environment of your choice.

If you would like to access the tools without programming in .NET and you have purchased a Pro version of SQL Data Compare or SQL Toolbelt™, you can use the command line interface.

For more information, visit our Web site at www.red-gate.com, send us an e-mail at info@red-gate.com, or visit the Red Gate Software Support Forum.

 

Licensing the SQL Data Compare API

To use the SQL Data Compare API, you must have a SQL Toolkit license. If you do not have a license, you will be able to use the toolkit for 14 days, but you will not be able to redistribute your applications.

  

The assemblies

To automate SQL Data Compare, you use the following .NET assemblies:

This assembly contains routines used by SQL Data Compare. It provides functions to access and execute batches of SQL statements and other helper functions.

This is the engine behind SQL Compare. For the SQL Data Compare API, it is used to retrieve the database schema.

This is the engine behind SQL Data Compare. It provides classes used for comparing and synchronizing the data in SQL Server databases. 

 

Referencing the assemblies

You can access the SQL Compare and SQL Data Compare engines from C#, Visual Basic .NET, or any other .NET language. The easiest way to do this is from within the Visual Studio .NET environment. Add references in your project to RedGate.SQL.Shared.dll, RedGate.SQLCompare.Engine.dll, and RedGate.SQLDataCompare.Engine.dll

 

Using the API

For details of how you use the API to automate the comparison and synchronization of data, see Comparing and Synchronizing Data Using the API. For a detailed example, see Worked Example

 

Sample API Projects

The SQL Data Compare API provides a number of sample API projects in C# and Visual Basic .NET. To download the sample API projects, click here.

The samples demonstrate how to:

 

See Also

Distributing Your Applications 

Frequently Asked Questions for the SQL Data Compare API