Re: Replication MSSQL-PostgreSQL - any success?

From: D Yeager <dyeager(at)teleport(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Replication MSSQL-PostgreSQL - any success?
Date: 2002-11-14 21:46:58
Message-ID: 200211141346.58324.dyeager@teleport.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> Hi, actually what I was after was a continuous way to keep a
> PostgreSQL db in sync with a changing MSSQL db.

> Once the data is migrated, a method of syncing any updates
> in the MSSQL db to the PostgreSQL db is what we require.
> I haven't discovered a nice way of doing that yet.

I've setup an active sync between an AS400->MSSQL which would work for
MSSQL->Postgres.

What you need to to is create a trigger on the MSSQL side which writes to a
separate table the key fields from the changed table. You then write a
program (mine's in Java on the AS400) which checks the tables the trigger
wrote, fetches the new data, and updates the target database (postgres).
Simply keep the check in a continuous loop (I actually wait a few minutes
between checks) and all your data is kept in sync almost realtime.

If you do use Java for this, the advantage is you can sync anything with a
JDBC driver, although it's probably not the fastest way to do it.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-11-14 22:18:06 Re: VACUUM
Previous Message Robert Treat 2002-11-14 21:45:51 Re: News Server Problems