Data Detailed PDF Print E-mail
Sync For SQLServer - Walkthrough
Friday, 29 June 2007

The first thing you need to do is to connect to your (see figure 1) SQL Server instances which will be your DataSource database. You repeat this step for your Destination database. The DataSource is the reference database. The Destination is the target database which will be updated. After the update the Destination will look in its schema the same as the Data Source. 

Connect
Figure 1: Screenshot Data Connection Properties.

In the Object Explorer tree (see figure 2) you can select "Set as Data Source" or "Set as Destination" to change the roles of the databases in the synchronization process. You can see in the picture which is the master and which is the destination database. 

Object Explorer
Figure 2: Screenshot Object Explorer.

Open the Data Migration Configurator in the menu Data (see figure 3) to select the tables for which you want to take over data. Table data will be transmitted from your Data Source database to your Destination database according to these settings. An example is to completely replace the Destination table data with the Data Source table data (see figure 3).

It is selected to delete the complete table data first. If you don't select to delete first and the key you try to insert already exist, a duplicate key exception is raised for each data record. But this is only a warning and the script continues executing. You can also specify a WHERE clause. In figure 3 only the records where the DepartmentID is greater than 3 are written to the script. 

Data Migration Configurator 1
Figure 3: Screenshot Insert Data Source Data.


Another setting keeps the table data in the Destination table and updates the columns you select with values out of your Data Source database table for each data row which matches by a key you have to select (see figure 4).
In this example you choose to keep the data in the table "HumanResources.Department" in the destination database. Then you update the table "HumanResources.Department" in the destination database with data out of the Data Source database table "HumanResources.Department". Here the column "Name" is updated. You can select the key (in this case the Primary Key "PK_Department_DepartmentID") by which you match the data rows to be updated between the DataSource and Destination database table. 


Data Migration Configurator 2
Figure 4: Screenshot Update Destination table data with Data Source table data.

If you chose all the settings for taking over data for each table you can now create the data migration scripts (see figure 5). Before you do that you have to select a workspace in which the scripts will be created. A workspace can represent a database update package for a synchronization between a certain DataSource database and a certain Destination database. All the scripts belonging to a workspace can be understood as a database update package. 


Data Migration Configurator 3
Figure 5: Screenshot Create Data Migration Scripts.

On the left hand side (see figure 6) you can see the data migration scripts created according to your Data Migration Settings. These are stored in your Active Workspace under the folder "DataScript". 

Create Data Migration Scripts
Figure 6: Screenshot Data Migration Package Created.

Last Updated ( Sunday, 22 July 2007 )
 
< Prev   Next >
About SleepyAnt Software | Privacy Policy | Terms of Service | Contact Us
Copyright 2005-2007 SleepyAnt Software. All rights reserved unless otherwise stated.
SleepyAnt Software and SleepyAnt Software