Set schema comparison data sources

dbForge Studio for PostgreSQL enables you to compare and synchronize PostgreSQL schemas and schema objects.

To start a new schema comparison project, specify two data sources, and optionally, set comparison options, schema and table mapping in the New Schema Comparison wizard.

Open the New Schema Comparison wizard

Open the New Schema Comparison wizard in one of these ways:

  • In the top menu, select Comparison > New Schema Comparison.
  • On the Start Page, select Database Design > New Schema Comparison.
  • In Database Explorer, right-click the server connection or database and select Tasks > New Schema Comparison.

Tip

When you select two databases in Database Explorer for schema comparison, dbForge Studio automatically assigns one as the source and the other as the target in the New Schema Comparison wizard.

Select data sources

On the Source and Target page, select the source and target server connections and databases for schema comparison.

dbForge Studio for PostgreSQL- Setting sources in the New Schema Comparison wizard

Note

The Source is the data source that remains unchanged, while the Target is the data source that is updated to match the source.

Tip

To refresh the list of databases, in Database, click Refresh.

Create a connection

1. In Connection, select Manage.

2. In the Connection Manager dialog, click New.

Create a connection in Connection Manager

3. In the Database Connection Properties dialog, configure the connection settings, then click Connect.

Tip

To verify the connection settings, click Test Connection, then click OK.

4. In the Connection Manager dialog, select the created connection.

5. Click OK.

Swap the source and target settings

To swap the source and target settings, click Swap Source and Target settings.

Copy source and target settings

To copy source settings to the target, click Copy Source settings to Target.

To copy target settings to the source, click Copy Target settings to Source.

Create .bat or .scomp files

You can create a .bat file with the command-line settings or a .scomp file with schema comparison options that you can use for automating or scheduling schema comparison tasks.

Create a .bat file

1. In the Schema Comparison wizard, select the source and target databases you want to compare.

2. Optional: Set the schema comparison options.

3. Click the arrow next to Save, then select Save Command Line.

Open the command-line wizard to save command-line settings to a .bat file

4. In the Command line execution settings dialog, set the command-line options.

5. To verify the settings, click Validate.

6. Click Save.

7. In the Save As dialog, enter the file name and path to store the .bat file, then click Save.

Create a .scomp file

1. In the Schema Comparison wizard, select the source and target databases you want to compare.

2. Optional: Set the schema comparison options.

3. Click the arrow next to Save, then select Save Document.

Save schema comparison settings to a .scomp file

4. In the Save File As dialog, enter the file name and path to store the .scomp file, then click Save.

Note

You can create a .bat or .scomp file on any page of the wizard.