Link and unlink static data

dbForge Studio for SQL Server enables you to link and track changes to both database schemas and static data using Source Control Manager.

What is static data?

Static data refers to a set of fixed values that rarely change or cannot be modified by users. This data is often referenced by transactional data and may include:

  • Reference and lookup tables
  • Configuration settings
  • Abbreviations for departments
  • Geographical locations
  • Code tables

Tracking changes to static data helps maintain database consistency and enables collaborative development. Version-controlling static data also improves traceability and supports shared development environments.

Note

To avoid data loss, always link static data to source control before updating your local database or reverting changes.

Link and commit static data

Note

You must link static data before deploying it to version control.

To link static data:

1. In Database Explorer, right-click the database containing the static data and select Source Control > Link / Unlink static data.

Link static data

2. In the Source Control Link Static Data dialog, select the tables you want to link, then click Apply.

Link static data dialog

Note

Only tables with properly defined primary keys can be linked.

The Refresh window appears and shows the progress of the operation.

Refresh

3. In the Local changes section, and select the linked tables.

4. Enter a comment describing the changes.

5. Click Commit.

Link DB to Working Folder

The Local changes section shows the status of each row in the static data:

  • All – All records in the table.
  • Added – New records that will be inserted.
  • Changed – Records that will be updated.
  • Removed – Records that will be deleted.
  • Identical – Records that remain unchanged.

Note

Version-controlling static data can impact performance. Avoid committing large tables with thousands of records. For larger data sets, use Data Compare functionality to compare and synchronize static data.

Resolve conflicts in static data

Conflicts occur when multiple users make changes to the same static data. A source control system cannot determine which version to keep, so user input is required to resolve the conflict.

In Source Control Manager, conflicting static data appears under the Different category. The left pane shows local changes; the right pane shows remote changes.

To resolve conflicts:

  • To keep the remote version: select the static data, click Get Remote, then click Get Latest.
  • To keep the local version: select the static data, click Get Local, then click Commit.
  • To discard uncommitted changes: click Undo.

Note

Static data conflicts occur only in the Dedicated development model.

View remote and local changes

  • Remote changes – Shows updates from the remote repository. Select the changes and click Get Latest to apply them. For instructions, see Get the latest version.

  • Local changes – Shows changes made locally. Enter a comment and click Commit to push changes to the repository. For instructions, see Commit changes.

Unlink static data

You can unlink static data in one of two ways.

Use Link/Unlink Static Data

1. In Database Explorer, right-click the database and select Source Control > Link/Unlink Static Data.

Unlink static data

2. Clear the checkbox next to the table you want to unlink.

3. Click Apply.

Apply the changes

Unlink the entire database

To unlink static data, in Database Explorer, right-click the database and select Source Control > Unlink Database from Source Control.

For more information, see Unlink a database from Source Control.