pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: D Yeager <dyeager@teleport.com>
To: pgsql-admin@postgresql.org
Subject: Re: Replication MSSQL-PostgreSQL - any success?
Date: Thu, 14 Nov 2002 13:46:58 -0800
Message-ID: <200211141346.58324.dyeager@teleport.com> (raw)
In-Reply-To: <20021114075912.A13886@psychofx.com>
References: <5.2.0.9.0.20021113214314.01f3be40@captech.no>
	<5.2.0.9.0.20021114010549.00bcdde8@mail.svt.ntnu.no>
	<20021114075912.A13886@psychofx.com>

> 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.



view thread (2+ messages)

Message-ID: <200211141346.58324.dyeager@teleport.com>
Permalink:  ../200211141346.58324.dyeager@teleport.com/
Also on:    postgresql.org/message-id/200211141346.58324.dyeager@teleport.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dyeager@teleport.com
  Subject: Re: Replication MSSQL-PostgreSQL - any success?
  In-Reply-To: <200211141346.58324.dyeager@teleport.com>
  References: <5.2.0.9.0.20021113214314.01f3be40@captech.no> <5.2.0.9.0.20021114010549.00bcdde8@mail.svt.ntnu.no> <20021114075912.A13886@psychofx.com> <200211141346.58324.dyeager@teleport.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox