From:       To:      
Home > Documentation > MS SQL to PostgreSQL

Synchronization for MS SQL and PostgreSQL

SQL Server to PostgreSQL converter implements synchronization as inserting data that not exists in the destination table and updating PostgreSQL rows with the related MS SQL data. For synchronization purpose source and destination tables must have identical structures and have primary key or unique index defined.

Assume both MS SQL and PostgreSQL databases have table "People" defined as below:

        ID Integer NOT NULL, 
        FName Varchar(50),
        LName Varchar(50), 
        EMail Varchar(50), 
        Primary Key (ID)

This table has the following contents in SQL Server database:

2  Andrew  White
3  Phil  Johnson

In PostgreSQL database:

1  John  Smith
2  Andew  White

After synchronizing PostgreSQL with MS SQL data the source table is kept untouched and the destination table is modified as follows:

1  John  Smith
2  Andew  White
3  Phil  Johnson

If you're looking for bi-directional incremental synchronization between SQL Server and PostgreSQL, take a look at MSSQL-PostgreSQL Sync tool.