Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BDBD7476D3F for ; Thu, 14 Nov 2002 16:47:06 -0500 (EST) Received: from mail.statesind.com (mail.statesind.com [12.108.27.20]) by postgresql.org (Postfix) with ESMTP id 78480476D02 for ; Thu, 14 Nov 2002 16:47:04 -0500 (EST) Received: from zz (mail.statesind.com [127.0.0.1]) (authenticated) by mail.statesind.com (8.11.6/8.11.6) with ESMTP id gAELkw520028 for ; Thu, 14 Nov 2002 13:47:03 -0800 Content-Type: text/plain; charset="iso-8859-1" From: D Yeager To: pgsql-admin@postgresql.org Subject: Re: Replication MSSQL-PostgreSQL - any success? Date: Thu, 14 Nov 2002 13:46:58 -0800 X-Mailer: KMail [version 1.4] 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> In-Reply-To: <20021114075912.A13886@psychofx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211141346.58324.dyeager@teleport.com> X-Scanned-By: MIMEDefang 2.14 (www dot roaringpenguin dot com slash mimedefang) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/156 X-Sequence-Number: 6344 > 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=20 MSSQL->Postgres. What you need to to is create a trigger on the MSSQL side which writes to a= =20 separate table the key fields from the changed table. You then write a=20 program (mine's in Java on the AS400) which checks the tables the trigger= =20 wrote, fetches the new data, and updates the target database (postgres).=20 Simply keep the check in a continuous loop (I actually wait a few minutes= =20 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= =20 JDBC driver, although it's probably not the fastest way to do it.