Compare and synchronize scripts folders and static data

A scripts folder is a set of scripts that represent a database schema and table data. It can be used to:

  • Version-control table data
  • Compare table data
  • Compare table data on a disconnected server

Static data is a fixed data set that is almost never changed after it has been collected.

With Data Compare, you can create a scripts folder with static data from an existing data source. You can do it in the New Data Comparison wizard when you set up the comparison.

Create a scripts folder with static data

To create a new scripts folder via Data Compare:

1. On the toolbar, click New Data Comparison.

2. In the New Data Comparison wizard that opens, select Scripts Folder from the Type dropdown list either as a Source or a Target.

3. Under Database scripts folder, click New to create a scripts folder.

Note

You can use an existing scripts folder. To do that, click Browse and select a folder.

4. In the Create Scripts Folder dialog that opens, select the Database source type, a server connection, and a database from which you’re creating a scripts folder.

Create the scripts folder

5. In the Destination section, select the Scripts Folder target type and set a path to the empty folder that will contain SQL scripts for objects and data.

6. Optional: To create static data, select the Include data checkbox.

7. Optional: To customize the scripts folder structure and file name templates, click Scripts Folder Structure. In the dialog that opens, select the types of objects you want to script and then click OK.

Customize the scripts folder structure and file name templates

Note

You can create a scripts folder from a database or another scripts folder.

8. Click Create.

Compare scripts folders

After a scripts folder has been created or selected, you can proceed with the data comparison process.

1. On the New Data Comparison > Source and Target page, select a Database target type from the dropdown list, a connection, and a database. Then, click Next.

2. On the Options page, set up comparison options and click Next. For more information, see Configure comparison options.

3. On the Mapping page, select tables, views, and columns to be compared, and click Compare. For more information about mapping options, see Select tables and views.

After the data comparison is complete, you can synchronize data. For more information, see Deploy data changes.

How to compare and synchronize scripts folders

When comparing and synchronizing scripts folders either as the Target or the Source, a synchronization script is created. It can be saved to a file or opened in an internal editor.

When a scripts folder is selected as the Source, you can select to execute the synchronization script directly a target database.

When a scripts folder is selected as the Target, you can select to update the scripts folder after synchronization.

Scripts folders synchronization issues

When using a scripts folder as a data source we recommend you to enable the following options:

  • Ignore spaces in object names
  • Ignore trailing spaces
  • Ignore leading spaces
  • Ignore end of line

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Data Compare for MySQL.
Request a demo

Request a demo

If you consider employing the Data Compare for your business, request a demo to see it in action.
Ready to start using dbForge Data Compare for MySQL?