Synchronize memory-optimized objects

SQL Server memory-optimized tables store and manage data entirely in memory (RAM) instead of traditional disk-based storage.

Limitations

When synchronizing a database that contains memory-optimized objects:

  • Memory-optimized objects cannot be synchronized inside a user transaction because such transactions do not support ALTER, DROP, or CREATE DDL statements.
  • If a synchronization script does not run inside a single transaction and the process fails, the changes cannot be rolled back, which may result in data loss.

Workflow

To safely synchronize databases with memory-optimized objects using dbForge Studio for SQL Server:

  • Step 1: Synchronize the memory-optimized objects with the Use a single transaction option disabled.
  • Step 2: Synchronize the remaining objects with the Use a single transaction option enabled.

Step 1: Synchronize memory-optimized objects

Note

Back up the target database before synchronization.

1. Open the New Schema Comparison wizard.

2. On the Source and Target page, specify the source and target databases and server connections.

3. Click Compare.

4. In the Schema Comparison document, select the memory-optimized objects for synchronization.

5. At the top of the document, click Synchronize objects to the target database to open the Schema Synchronization Wizard.

6. Navigate to the Options page.

7. Under the Transactions section, clear the Use a single transaction checkbox.

8. Click Synchronize.

Step 2: Synchronize the remaining objects

1. Return to the Schema Comparison document.

2. Select the remaining objects for synchronization.

3. At the top of the document, click Synchronize objects to the target database to open the Schema Synchronization Wizard.

4. Navigate to the Options page.

5. Under the Transactions section, select the Use a single transaction checkbox.

6. Click Synchronize.