From kevin@stockwelldesigngroup.com Mon Jul 10 15:49:35 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4020A9FB2B7 for ; Mon, 10 Jul 2006 12:49:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 92917-05 for ; Mon, 10 Jul 2006 12:49:30 -0300 (ADT) X-Greylist: delayed 00:21:30.305441 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A2B8E9FB28F for ; Mon, 10 Jul 2006 12:49:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from stockwelldesigngroup.com (mail.stockwelldesigngroup.com [66.97.4.21]) by svr4.postgresql.org (Postfix) with ESMTP id 43BC65AF02D for ; Mon, 10 Jul 2006 15:27:59 +0000 (GMT) Received: from WorldClient by stockwelldesigngroup.com (MDaemon PRO v9.0.1) with ESMTP id md50000036808.msg for ; Mon, 10 Jul 2006 11:27:56 -0400 Received: from [65.41.91.88] by stockwelldesigngroup.com via WorldClient with HTTP; Mon, 10 Jul 2006 11:27:52 -0400 Date: Mon, 10 Jul 2006 11:27:52 -0400 From: "Kevin Bednar" To: pgsql-sql@postgresql.org Subject: MS-SQL<->Postgres sync MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_0710-1127-52-PART-BREAK" Message-ID: X-Mailer: WorldClient 9.0.1 X-Authenticated-Sender: kevin@stockwelldesigngroup.com X-Spam-Processed: stockwelldesigngroup.com, Mon, 10 Jul 2006 11:27:56 -0400 (not processed: message from valid local sender) X-Return-Path: kevin@stockwelldesigngroup.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-MDAV-Processed: stockwelldesigngroup.com, Mon, 10 Jul 2006 11:27:57 -0400 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/145 X-Sequence-Number: 25719 --_0710-1127-52-PART-BREAK Content-Type: text/plain; charset=us-ascii Looking to keep 2 databases in sync, at least semi-realtime if possible, although running a batch update every x mins wouldn't be out of the question. One db is postgres and the other is ms-sql. It's to keep inventory in sync from 2 seperate locations, one being a brick and mortar store and the other an ecommerce system for a web site. Any and all help is appreciated since I can't find much of anything on syncing these 2 database systems! Kevin Bednar Systems Support Stockwell Design Group http://www.stockwelldesigngroup.com kevin@stockwelldesigngroup.com --_0710-1127-52-PART-BREAK Content-Type: text/html; charset=us-ascii
Looking to keep 2 databases in sync, at least semi-realtime if possible, although running a batch update every x mins wouldn't be out of the question. One db is postgres and the other is ms-sql. It's to keep inventory in sync from 2 seperate locations, one being a brick and mortar store and the other an ecommerce system for a web site. Any and all help is appreciated since I can't find much of anything on syncing these 2 database systems!
 

Kevin Bednar
Systems Support
Stockwell Design Group
http://www.stockwelldesigngroup.com
--_0710-1127-52-PART-BREAK-- From forums@existanze.com Mon Jul 10 16:06:58 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C65269FB328 for ; Mon, 10 Jul 2006 13:06:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 94875-10 for ; Mon, 10 Jul 2006 13:06:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 3312B9FB2E2 for ; Mon, 10 Jul 2006 13:06:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from deliver.hol.gr (unknown [62.38.3.139]) by svr4.postgresql.org (Postfix) with ESMTP id 38C285AF02E for ; Mon, 10 Jul 2006 16:06:49 +0000 (GMT) Received: from auth-smtp.hol.gr (takeit01.mail.dc.hol.net [192.168.20.71]) by deliver.hol.gr (8.12.11/8.11.6) with ESMTP id k6AG61rB028313 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256 bits) verified OK) for ; Mon, 10 Jul 2006 19:06:01 +0300 Received: from pimp (static223128.dsl.hol.gr [62.38.223.129]) by auth-smtp.hol.gr (8.13.1/8.12.11) with ESMTP id k6AG6gmF032317 for ; Mon, 10 Jul 2006 19:06:42 +0300 Message-Id: <200607101606.k6AG6gmF032317@auth-smtp.hol.gr> From: "Forums @ Existanze" To: Subject: Re: MS-SQL<->Postgres sync Date: Mon, 10 Jul 2006 19:06:54 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0089_01C6A454.021E8300" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcakOfD/mQnmMBLaTj6dQYvaxhiYAgAANmQA In-Reply-To: X-Virus-Scanned: ClamAV 0.87/1590/Mon Jul 10 08:34:09 2006 on takeit01.mail.dc.hol.net X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/146 X-Sequence-Number: 25720 This is a multi-part message in MIME format. ------=_NextPart_000_0089_01C6A454.021E8300 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We are looking for the exact thing but with two PostgreSQL databases _____ From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Kevin Bednar Sent: 10 July 2006 18:28 To: pgsql-sql@postgresql.org Subject: [SQL] MS-SQL<->Postgres sync Looking to keep 2 databases in sync, at least semi-realtime if possible, although running a batch update every x mins wouldn't be out of the question. One db is postgres and the other is ms-sql. It's to keep inventory in sync from 2 seperate locations, one being a brick and mortar store and the other an ecommerce system for a web site. Any and all help is appreciated since I can't find much of anything on syncing these 2 database systems! Kevin Bednar Systems Support Stockwell Design Group http://www.stockwelldesigngroup.com kevin@stockwelldesigngroup.com ------=_NextPart_000_0089_01C6A454.021E8300 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
 
We are looking for the exact thing=  but with two PostgreSQL databases=

 

From: = pgsql-sql-owner@postgresql.org=20 [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Kevin=20 Bednar
Sent: 10 July 2006 18:28
To:=20 pgsql-sql@postgresql.org
Subject: [SQL] = MS-SQL<->Postgres=20 sync

Looking to keep 2 databases in sync, at least semi-realtime if = possible,=20 although running a batch update every x mins wouldn't be out of the = question.=20 One db is postgres and the other is ms-sql. It's to keep inventory in = sync=20 from 2 seperate locations, one being a brick and mortar store and the=20 other an ecommerce system for a web site. Any and all help = is=20 appreciated since I can't find much of anything on syncing these 2 = database=20 systems!
 

Kevin Bednar
Systems Support
Stockwell Design = Group
http://www.stockwelldesigngr= oup.com
kevin@stockwelldesigngroup= .com
------=_NextPart_000_0089_01C6A454.021E8300-- From ajs@crankycanuck.ca Mon Jul 10 16:25:36 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 484059FB2E0 for ; Mon, 10 Jul 2006 13:25:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 98121-03 for ; Mon, 10 Jul 2006 13:25:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id EE71F9FB2DA for ; Mon, 10 Jul 2006 13:25:31 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1FzyhY-0002Pi-I6 for pgsql-sql@postgresql.org; Mon, 10 Jul 2006 12:33:40 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id EA5C7417B; Mon, 10 Jul 2006 12:25:20 -0400 (EDT) Date: Mon, 10 Jul 2006 12:25:20 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: MS-SQL<->Postgres sync Message-ID: <20060710162520.GA4590@phlogiston.dyndns.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/147 X-Sequence-Number: 25721 On Mon, Jul 10, 2006 at 11:27:52AM -0400, Kevin Bednar wrote: > Looking to keep 2 databases in sync, at least semi-realtime if possible, > although running a batch update every x mins wouldn't be out of the > question. One db is postgres and the other is ms-sql. It's to keep inventory > in sync from 2 seperate locations, one being a brick and mortar store and > the other an ecommerce system for a web site. Any and all help is > appreciated since I can't find much of anything on syncing these 2 database > systems! I don't think there's actually any product that does this right now, unless you're willing to use some sort of statement replica system (which means you have to deal with failures in one database and not another). Is the idea that this is multi-master? A -- Andrew Sullivan | ajs@crankycanuck.ca The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun From postgresql@aranya.com Mon Jul 10 16:48:17 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 621729FB303 for ; Mon, 10 Jul 2006 13:48:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 01867-03 for ; Mon, 10 Jul 2006 13:48:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by postgresql.org (Postfix) with ESMTP id DDF8E9FB2FF for ; Mon, 10 Jul 2006 13:48:13 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id y25so708615nfb for ; Mon, 10 Jul 2006 09:48:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=EARQPakBD2JaYpewKMUke0eoORscUggJ/wkzCe3kAwSu3jB0jhf8Ut128+qLdURb41nM+MxBRA5WB/kxqUEoc1QAWgkOiHsS7sEMP9A4qM2t1qG9Z2+W00FKuTplF2TRDbeyB+kOUy8/7iY9rHlSGUL2auIDFoGW+apQF8T3idA= Received: by 10.78.160.2 with SMTP id i2mr1773818hue; Mon, 10 Jul 2006 09:48:12 -0700 (PDT) Received: by 10.78.29.2 with HTTP; Mon, 10 Jul 2006 09:48:12 -0700 (PDT) Message-ID: Date: Mon, 10 Jul 2006 11:48:12 -0500 From: "Aaron Bono" To: "Kevin Bednar" Subject: Re: MS-SQL<->Postgres sync Cc: pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_34049_26142391.1152550092511" References: X-Google-Sender-Auth: f22fc30718625e1b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/149 X-Sequence-Number: 25723 ------=_Part_34049_26142391.1152550092511 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/10/06, Kevin Bednar wrote: > > Looking to keep 2 databases in sync, at least semi-realtime if possible, > although running a batch update every x mins wouldn't be out of the > question. One db is postgres and the other is ms-sql. It's to keep inventory > in sync from 2 seperate locations, one being a brick and mortar store and > the other an ecommerce system for a web site. Any and all help is > appreciated since I can't find much of anything on syncing these 2 database > systems! > > > Kevin Bednar > Can you provide more information about what data is needing to be fed back and forth? Are both databases being updated or can you set one as the system of record? Why can't you have the web site read directly from MS SQL Server? With a little more information we can provide more useful advice. Thanks, Aaron ------=_Part_34049_26142391.1152550092511 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/10/06, Kevin Bednar <kevin@stockwelldesigngroup.com> wrote:
Looking to keep 2 databases in sync, at least semi-realtime if possible, although running a batch update every x mins wouldn't be out of the question. One db is postgres and the other is ms-sql. It's to keep inventory in sync from 2 seperate locations, one being a brick and mortar store and the other an ecommerce system for a web site. Any and all help is appreciated since I can't find much of anything on syncing these 2 database systems!
 

Kevin Bednar

Can you provide more information about what data is needing to be fed back and forth?  Are both databases being updated or can you set one as the system of record?  Why can't you have the web site read directly from MS SQL Server?

With a little more information we can provide more useful advice.

Thanks,
Aaron

------=_Part_34049_26142391.1152550092511-- From postgresql@aranya.com Mon Jul 10 17:15:44 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E80539FB2D1 for ; Mon, 10 Jul 2006 14:15:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 03316-10 for ; Mon, 10 Jul 2006 14:15:36 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by postgresql.org (Postfix) with ESMTP id 5F2C99FB2D5 for ; Mon, 10 Jul 2006 14:15:35 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id l37so520051nfc for ; Mon, 10 Jul 2006 10:15:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=C9tY64FMtn79ByYsgfrKx8Jvce6oGILKOBQgknwF8C6pqXZl1bh85YjjUe0M12KJCtaP3wKBzZAXSEbMaXjWdfCfnwdrQVE9uAmFkOSgjvpjVR8D8m5E3Go7zbErNpbcJacxLzY6O8jco+Fr/B0J5Dnto4MCxgGj72nn8258eE8= Received: by 10.78.151.3 with SMTP id y3mr1785261hud; Mon, 10 Jul 2006 10:15:34 -0700 (PDT) Received: by 10.78.29.2 with HTTP; Mon, 10 Jul 2006 10:15:34 -0700 (PDT) Message-ID: Date: Mon, 10 Jul 2006 12:15:34 -0500 From: "Aaron Bono" To: "Kevin Bednar" , pgsql-sql@postgresql.org Subject: Re: MS-SQL<->Postgres sync In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_34950_26519581.1152551734693" References: X-Google-Sender-Auth: 2b51f1e0ad8f670b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/150 X-Sequence-Number: 25724 ------=_Part_34950_26519581.1152551734693 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Please reply to all when replying on the list... On 7/10/06, Kevin Bednar wrote: > > Thanks Aron. What I'm actually trying to do is this: > > Postgress in physical store, being used by POS system as the back end. > MS-SQL being used on web server by ecommerce system. > > Table structures are different of course, but some common fields. What I > want to do is when an item is sold in the store, update the quantity field > for that sku number on the web site and vice versa. Only 2 fields basically > need to be updated on each side, the SKU number and quantity. This is to > keep the product table in sync and try to avoid selling product that isnt in > stock and setting a flag on the web system stating such. Thanks for your > help. > For something this simple you are probably better off doing some custom coding. If you have the ability to modify the databases, I would recommend putting a trigger on each database so when there is a product sold, that sale is recorded in a temp table (which serves as a queue of data that needs to be synched). Then have a process read from these temp tables and feed the data back to the other database. Of course, I am assuming you have full control to change the databases - some vendors do not allow that. You may be able to connect the databases - MS SQL Server will definitely allow you to connect via ODBC to another database and feed data back and forth. I think there are add on modules for PostgreSQL but I have not tried to have PostgreSQL talk to other databases before. -Aaron ------=_Part_34950_26519581.1152551734693 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Please reply to all when replying on the list...

On 7/10/06, Kevin Bednar <kevin@stockwelldesigngroup.com > wrote:
Thanks Aron. What I'm actually trying to do is this:
 
Postgress in physical store, being used by POS system as the back end.
MS-SQL being used on web server by ecommerce system.
 
Table structures are different of course, but some common fields. What I want to do is when an item is sold in the store, update the quantity field for that sku number on the web site and vice versa. Only 2 fields basically need to be updated on each side, the SKU number and quantity. This is to keep the product table in sync and try to avoid selling product that isnt in stock and setting a flag on the web system stating such. Thanks for your help.

 
For something this simple you are probably better off doing some custom coding.

If you have the ability to modify the databases, I would recommend putting a trigger on each database so when there is a product sold, that sale is recorded in a temp table (which serves as a queue of data that needs to be synched).  Then have a process read from these temp tables and feed the data back to the other database.  Of course, I am assuming you have full control to change the databases - some vendors do not allow that.

You may be able to connect the databases - MS SQL Server will definitely allow you to connect via ODBC to another database and feed data back and forth.  I think there are add on modules for PostgreSQL but I have not tried to have PostgreSQL talk to other databases before.

-Aaron
------=_Part_34950_26519581.1152551734693-- From kevin@stockwelldesigngroup.com Mon Jul 10 17:21:00 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 40E939FB269 for ; Mon, 10 Jul 2006 14:21:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 07265-01 for ; Mon, 10 Jul 2006 14:20:54 -0300 (ADT) X-Greylist: delayed 01:52:54.2733 by SQLgrey- Received: from stockwelldesigngroup.com (mail.stockwelldesigngroup.com [66.97.4.21]) by postgresql.org (Postfix) with ESMTP id 935199FB24A for ; Mon, 10 Jul 2006 14:20:54 -0300 (ADT) Received: from WorldClient by stockwelldesigngroup.com (MDaemon PRO v9.0.1) with ESMTP id md50000036872.msg for ; Mon, 10 Jul 2006 13:20:53 -0400 Received: from [65.41.91.88] by stockwelldesigngroup.com via WorldClient with HTTP; Mon, 10 Jul 2006 13:20:52 -0400 Date: Mon, 10 Jul 2006 13:20:52 -0400 From: "Kevin Bednar" To: "Aaron Bono" , pgsql-sql@postgresql.org Subject: Re: MS-SQL<->Postgres sync MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_0710-1320-52-PART-BREAK" Message-ID: X-Mailer: WorldClient 9.0.1 In-Reply-To: References: X-Authenticated-Sender: kevin@stockwelldesigngroup.com X-Spam-Processed: stockwelldesigngroup.com, Mon, 10 Jul 2006 13:20:53 -0400 (not processed: message from valid local sender) X-Return-Path: kevin@stockwelldesigngroup.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-MDAV-Processed: stockwelldesigngroup.com, Mon, 10 Jul 2006 13:20:53 -0400 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/151 X-Sequence-Number: 25725 --_0710-1320-52-PART-BREAK Content-Type: text/plain; charset=us-ascii Yeah, I was kind of thinking that myself. I do have control over both DB's, and postgres does have an ODBC connector available as well. Perhaps using a trigger to watch a temp table on each site and having it replicate to the opposite side and then remove the record from the temp table would work. I'll have to look into it. Thanks! Kevin -----Original Message----- From: "Aaron Bono" To: "Kevin Bednar" , pgsql-sql@postgresql.org Date: Mon, 10 Jul 2006 12:15:34 -0500 Subject: Re: [SQL] MS-SQL<->Postgres sync Please reply to all when replying on the list... On 7/10/06, Kevin Bednar wrote: Thanks Aron. What I'm actually trying to do is this: Postgress in physical store, being used by POS system as the back end. MS-SQL being used on web server by ecommerce system. Table structures are different of course, but some common fields. What I want to do is when an item is sold in the store, update the quantity field for that sku number on the web site and vice versa. Only 2 fields basically need to be updated on each side, the SKU number and quantity. This is to keep the product table in sync and try to avoid selling product that isnt in stock and setting a flag on the web system stating such. Thanks for your help. For something this simple you are probably better off doing some custom coding. If you have the ability to modify the databases, I would recommend putting a trigger on each database so when there is a product sold, that sale is recorded in a temp table (which serves as a queue of data that needs to be synched). Then have a process read from these temp tables and feed the data back to the other database. Of course, I am assuming you have full control to change the databases - some vendors do not allow that. You may be able to connect the databases - MS SQL Server will definitely allow you to connect via ODBC to another database and feed data back and forth. I think there are add on modules for PostgreSQL but I have not tried to have PostgreSQL talk to other databases before. -Aaron --_0710-1320-52-PART-BREAK Content-Type: text/html; charset=us-ascii
Yeah, I was kind of thinking that myself. I do have control over both DB's, and postgres does have an ODBC connector available as well. Perhaps using a trigger to watch a temp table on each site and having it replicate to the opposite side and then remove the record from the temp table would work. I'll have to look into it. Thanks!
 
Kevin

 
-----Original Message-----
From: "Aaron Bono" <postgresql@aranya.com>
To: "Kevin Bednar" <kevin@stockwelldesigngroup.com>, pgsql-sql@postgresql.org
Date: Mon, 10 Jul 2006 12:15:34 -0500
Subject: Re: [SQL] MS-SQL<->Postgres sync

Please reply to all when replying on the list...

On 7/10/06, Kevin Bednar <kevin@stockwelldesigngroup.com > wrote:
Thanks Aron. What I'm actually trying to do is this:
 
Postgress in physical store, being used by POS system as the back end.
MS-SQL being used on web server by ecommerce system.
 
Table structures are different of course, but some common fields. What I want to do is when an item is sold in the store, update the quantity field for that sku number on the web site and vice versa. Only 2 fields basically need to be updated on each side, the SKU number and quantity. This is to keep the product table in sync and try to avoid selling product that isnt in stock and setting a flag on the web system stating such. Thanks for your help.

 
For something this simple you are probably better off doing some custom coding.

If you have the ability to modify the databases, I would recommend putting a trigger on each database so when there is a product sold, that sale is recorded in a temp table (which serves as a queue of data that needs to be synched).  Then have a process read from these temp tables and feed the data back to the other database.  Of course, I am assuming you have full control to change the databases - some vendors do not allow that.

You may be able to connect the databases - MS SQL Server will definitely allow you to connect via ODBC to another database and feed data back and forth.  I think there are add on modules for PostgreSQL but I have not tried to have PostgreSQL talk to other databases before.

-Aaron
--_0710-1320-52-PART-BREAK-- From rabroersma@yahoo.com Mon Jul 10 17:57:43 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5DDC29FB371 for ; Mon, 10 Jul 2006 14:57:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 22815-02-2 for ; Mon, 10 Jul 2006 14:57:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31806.mail.mud.yahoo.com (web31806.mail.mud.yahoo.com [68.142.207.69]) by postgresql.org (Postfix) with SMTP id 028FB9FB33E for ; Mon, 10 Jul 2006 14:57:34 -0300 (ADT) Received: (qmail 15414 invoked by uid 60001); 10 Jul 2006 17:57:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=reh2Z2IuvlufMw1ZXaA4Htl1fb/iVmyANlSx3DiHkItkFprH6JhKOfpQAJmWV+oenXT1+di5vm+cTtAVcd7lwl7Gt6YpudYfojpZOt6s5Faa6gqep95m4IKrtLDDAfRsjL0KpNUhOfmMXSkP2drj8fGNpUQnPPolsgd6fmNl2wg= ; Message-ID: <20060710175733.15412.qmail@web31806.mail.mud.yahoo.com> Received: from [63.203.180.122] by web31806.mail.mud.yahoo.com via HTTP; Mon, 10 Jul 2006 10:57:33 PDT Date: Mon, 10 Jul 2006 10:57:33 -0700 (PDT) From: Richard Broersma Jr Subject: Re: MS-SQL<->Postgres sync To: Aaron Bono , Kevin Bednar , pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/152 X-Sequence-Number: 25726 > On 7/10/06, Kevin Bednar wrote: > > > > Thanks Aron. What I'm actually trying to do is this: > > > > Postgress in physical store, being used by POS system as the back end. > > MS-SQL being used on web server by ecommerce system. > > > > Table structures are different of course, but some common fields. What I > > want to do is when an item is sold in the store, update the quantity field > > for that sku number on the web site and vice versa. Only 2 fields basically > > need to be updated on each side, the SKU number and quantity. This is to > > keep the product table in sync and try to avoid selling product that isnt in > > stock and setting a flag on the web system stating such. Thanks for your > > help. > > > > > For something this simple you are probably better off doing some custom > coding. > > If you have the ability to modify the databases, I would recommend putting a > trigger on each database so when there is a product sold, that sale is > recorded in a temp table (which serves as a queue of data that needs to be > synched). Then have a process read from these temp tables and feed the data > back to the other database. Of course, I am assuming you have full control > to change the databases - some vendors do not allow that. > > You may be able to connect the databases - MS SQL Server will definitely > allow you to connect via ODBC to another database and feed data back and > forth. I think there are add on modules for PostgreSQL but I have not tried > to have PostgreSQL talk to other databases before. I am not sure if this applys directly to the problem here, but this link my be useful also. http://archives.postgresql.org/pgsql-general/2006-07/msg00298.php Regards, Richard Broersma Jr. From smarlowe@g2switchworks.com Mon Jul 10 18:31:06 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8DEDA9FB284 for ; Mon, 10 Jul 2006 15:31:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 46521-06 for ; Mon, 10 Jul 2006 15:30:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 594D39FB259 for ; Mon, 10 Jul 2006 15:30:52 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Mon, 10 Jul 2006 18:30:51 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 10 Jul 2006 13:30:51 -0500 Subject: Re: MS-SQL<->Postgres sync From: Scott Marlowe To: Andrew Sullivan Cc: pgsql-sql@postgresql.org In-Reply-To: <20060710162520.GA4590@phlogiston.dyndns.org> References: <20060710162520.GA4590@phlogiston.dyndns.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1152556251.6540.14.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 10 Jul 2006 13:30:51 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/156 X-Sequence-Number: 25730 On Mon, 2006-07-10 at 11:25, Andrew Sullivan wrote: > On Mon, Jul 10, 2006 at 11:27:52AM -0400, Kevin Bednar wrote: > > Looking to keep 2 databases in sync, at least semi-realtime if possible, > > although running a batch update every x mins wouldn't be out of the > > question. One db is postgres and the other is ms-sql. It's to keep inventory > > in sync from 2 seperate locations, one being a brick and mortar store and > > the other an ecommerce system for a web site. Any and all help is > > appreciated since I can't find much of anything on syncing these 2 database > > systems! > > I don't think there's actually any product that does this right now, > unless you're willing to use some sort of statement replica system > (which means you have to deal with failures in one database and not > another). Is the idea that this is multi-master? I wonder if it would be possible to write a set of triggers for MSSQL that would allow you to run slony daemons that connected to it and a postgresql server and did replication. Just mad scientisting for a second. From smarlowe@g2switchworks.com Mon Jul 10 18:31:45 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 846E59FB27B for ; Mon, 10 Jul 2006 15:31:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 48254-01 for ; Mon, 10 Jul 2006 15:31:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 8A1889FB259 for ; Mon, 10 Jul 2006 15:31:36 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Mon, 10 Jul 2006 18:31:35 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 10 Jul 2006 13:31:35 -0500 Subject: Re: MS-SQL<->Postgres sync From: Scott Marlowe To: "Forums @ Existanze" Cc: pgsql-sql@postgresql.org In-Reply-To: <200607101606.k6AG6gmF032317@auth-smtp.hol.gr> References: <200607101606.k6AG6gmF032317@auth-smtp.hol.gr> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1152556295.6540.16.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 10 Jul 2006 13:31:35 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/154 X-Sequence-Number: 25728 Look at slony. On Mon, 2006-07-10 at 11:06, Forums @ Existanze wrote: > > We are looking for the exact thing but with two PostgreSQL databases > > > ______________________________________________________________ > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Kevin > Bednar > Sent: 10 July 2006 18:28 > To: pgsql-sql@postgresql.org > Subject: [SQL] MS-SQL<->Postgres sync > > > Looking to keep 2 databases in sync, at least semi-realtime if > possible, although running a batch update every x mins > wouldn't be out of the question. One db is postgres and the > other is ms-sql. It's to keep inventory in sync from 2 > seperate locations, one being a brick and mortar store and the > other an ecommerce system for a web site. Any and all help is > appreciated since I can't find much of anything on syncing > these 2 database systems! > > Kevin Bednar > Systems Support > Stockwell Design Group > http://www.stockwelldesigngroup.com > kevin@stockwelldesigngroup.com > From kevin@stockwelldesigngroup.com Mon Jul 10 18:59:59 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B56D89FB326 for ; Mon, 10 Jul 2006 15:59:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 55672-04 for ; Mon, 10 Jul 2006 15:59:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stockwelldesigngroup.com (mail.stockwelldesigngroup.com [66.97.4.21]) by postgresql.org (Postfix) with ESMTP id 2C9379FB2F0 for ; Mon, 10 Jul 2006 15:59:54 -0300 (ADT) Received: from WorldClient by stockwelldesigngroup.com (MDaemon PRO v9.0.1) with ESMTP id md50000036919.msg for ; Mon, 10 Jul 2006 14:59:52 -0400 Received: from [65.41.91.88] by stockwelldesigngroup.com via WorldClient with HTTP; Mon, 10 Jul 2006 14:59:50 -0400 Date: Mon, 10 Jul 2006 14:59:50 -0400 From: "Kevin Bednar" To: "Scott Marlowe" , "Forums @ Existanze" , pgsql-sql@postgresql.org Subject: Re: MS-SQL<->Postgres sync MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_0710-1459-50-PART-BREAK" Message-ID: X-Mailer: WorldClient 9.0.1 In-Reply-To: <1152556295.6540.16.camel@state.g2switchworks.com> References: <200607101606.k6AG6gmF032317@auth-smtp.hol.gr> <1152556295.6540.16.camel@state.g2switchworks.com> X-Authenticated-Sender: kevin@stockwelldesigngroup.com X-Spam-Processed: stockwelldesigngroup.com, Mon, 10 Jul 2006 14:59:52 -0400 (not processed: message from valid local sender) X-Return-Path: kevin@stockwelldesigngroup.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-MDAV-Processed: stockwelldesigngroup.com, Mon, 10 Jul 2006 14:59:53 -0400 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/155 X-Sequence-Number: 25729 --_0710-1459-50-PART-BREAK Content-Type: text/plain; charset=us-ascii Took a quick glance but were running windows on both sides and it didnt look like that would work. Didnt look real hard though. Kevin -----Original Message----- From: Scott Marlowe To: "Forums @ Existanze" Cc: pgsql-sql@postgresql.org Date: Mon, 10 Jul 2006 13:31:35 -0500 Subject: Re: [SQL] MS-SQL<->Postgres sync Look at slony. On Mon, 2006-07-10 at 11:06, Forums @ Existanze wrote: > > We are looking for the exact thing but with two PostgreSQL databases > > > ______________________________________________________________ > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Kevin > Bednar > Sent: 10 July 2006 18:28 > To: pgsql-sql@postgresql.org > Subject: [SQL] MS-SQL<->Postgres sync > > > Looking to keep 2 databases in sync, at least semi-realtime if > possible, although running a batch update every x mins > wouldn't be out of the question. One db is postgres and the > other is ms-sql. It's to keep inventory in sync from 2 > seperate locations, one being a brick and mortar store and the > other an ecommerce system for a web site. Any and all help is > appreciated since I can't find much of anything on syncing > these 2 database systems! > > Kevin Bednar > Systems Support > Stockwell Design Group > http://www.stockwelldesigngroup.com > kevin@stockwelldesigngroup.com > ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org --_0710-1459-50-PART-BREAK Content-Type: text/html; charset=us-ascii
Took a quick glance but were running windows on both sides and it didnt look like that would work. Didnt look real hard though.
 
Kevin
 

 
-----Original Message-----
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: "Forums @ Existanze" <forums@existanze.com>
Cc: pgsql-sql@postgresql.org
Date: Mon, 10 Jul 2006 13:31:35 -0500
Subject: Re: [SQL] MS-SQL<->Postgres sync

Look at slony.

On Mon, 2006-07-10 at 11:06, Forums @ Existanze wrote:
>  
> We are looking for the exact thing but with two PostgreSQL databases
>  
>        
>         ______________________________________________________________
>         From: pgsql-sql-owner@postgresql.org
>         [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Kevin
>         Bednar
>         Sent: 10 July 2006 18:28
>         To: pgsql-sql@postgresql.org
>         Subject: [SQL] MS-SQL<->Postgres sync
>        
>        
>         Looking to keep 2 databases in sync, at least semi-realtime if
>         possible, although running a batch update every x mins
>         wouldn't be out of the question. One db is postgres and the
>         other is ms-sql. It's to keep inventory in sync from 2
>         seperate locations, one being a brick and mortar store and the
>         other an ecommerce system for a web site. Any and all help is
>         appreciated since I can't find much of anything on syncing
>         these 2 database systems!
>          
>         Kevin Bednar
>         Systems Support
>         Stockwell Design Group
>         http://www.stockwelldesigngroup.com
>         kevin@stockwelldesigngroup.com
>        

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
--_0710-1459-50-PART-BREAK-- From smarlowe@g2switchworks.com Mon Jul 10 19:02:45 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 094A49FB286 for ; Mon, 10 Jul 2006 16:02:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 54427-10 for ; Mon, 10 Jul 2006 16:02:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id A12369FB284 for ; Mon, 10 Jul 2006 16:02:36 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Mon, 10 Jul 2006 19:02:35 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 10 Jul 2006 14:02:35 -0500 Subject: Re: MS-SQL<->Postgres sync From: Scott Marlowe To: Kevin Bednar Cc: "Forums @ Existanze" , pgsql-sql@postgresql.org In-Reply-To: References: <200607101606.k6AG6gmF032317@auth-smtp.hol.gr> <1152556295.6540.16.camel@state.g2switchworks.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1152558155.6540.18.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 10 Jul 2006 14:02:35 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/160 X-Sequence-Number: 25734 I think there's a version with windows support due out soon. Not sure, since I don't run windows... just remember seeing it mentioned. On Mon, 2006-07-10 at 13:59, Kevin Bednar wrote: > Took a quick glance but were running windows on both sides and it > didnt look like that would work. Didnt look real hard though. > > Kevin > > > -----Original Message----- > From: Scott Marlowe > To: "Forums @ Existanze" > Cc: pgsql-sql@postgresql.org > Date: Mon, 10 Jul 2006 13:31:35 -0500 > Subject: Re: [SQL] MS-SQL<->Postgres sync > > Look at slony. > > On Mon, 2006-07-10 at 11:06, Forums @ Existanze wrote: > > > > We are looking for the exact thing but with two PostgreSQL > databases > > > > > > > ______________________________________________________________ > > From: pgsql-sql-owner@postgresql.org > > [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of > Kevin > > Bednar > > Sent: 10 July 2006 18:28 > > To: pgsql-sql@postgresql.org > > Subject: [SQL] MS-SQL<->Postgres sync > > > > > > Looking to keep 2 databases in sync, at least > semi-realtime if > > possible, although running a batch update every x > mins > > wouldn't be out of the question. One db is postgres > and the > > other is ms-sql. It's to keep inventory in sync from > 2 > > seperate locations, one being a brick and mortar > store and the > > other an ecommerce system for a web site. Any and > all help is > > appreciated since I can't find much of anything on > syncing > > these 2 database systems! > > > > Kevin Bednar > > Systems Support > > Stockwell Design Group > > http://www.stockwelldesigngroup.com > > kevin@stockwelldesigngroup.com > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > From alvherre@commandprompt.com Mon Jul 10 19:34:12 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6C1289FA43C for ; Mon, 10 Jul 2006 16:34:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 61721-04 for ; Mon, 10 Jul 2006 16:34:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx3.surnet.cl (mx3.surnet.cl [216.155.73.182]) by postgresql.org (Postfix) with ESMTP id 034489FB303 for ; Mon, 10 Jul 2006 16:34:03 -0300 (ADT) Received: from 201-221-221-58.bk12-dsl.surnet.cl (HELO alvh.no-ip.org) ([201.221.221.58]) by mx3.surnet.cl with ESMTP; 10 Jul 2006 15:34:02 -0400 X-IronPort-AV: i="4.06,225,1149480000"; d="scan'208"; a="25041300:sNHT19460600" Received: by alvh.no-ip.org (Postfix, from userid 1000) id E30FEC5CDB7; Mon, 10 Jul 2006 15:33:59 -0400 (CLT) Date: Mon, 10 Jul 2006 15:33:59 -0400 From: Alvaro Herrera To: Kevin Bednar Cc: Scott Marlowe , "Forums @ Existanze" , pgsql-sql@postgresql.org Subject: Re: MS-SQL<->Postgres sync Message-ID: <20060710193359.GC27385@surnet.cl> Mail-Followup-To: Kevin Bednar , Scott Marlowe , "Forums @ Existanze" , pgsql-sql@postgresql.org References: <200607101606.k6AG6gmF032317@auth-smtp.hol.gr> <1152556295.6540.16.camel@state.g2switchworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/159 X-Sequence-Number: 25733 Kevin Bednar wrote: > Took a quick glance but were running windows on both sides and it didnt look > like that would work. Didnt look real hard though. I think the to-be-released stuff is supposed to have Windows support. They were supposed to release Real Soon Now some time ago, so I guess they are going to release Real Soon Now. Maybe you could help them with the beta testing if that's what they need. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support From dpage@vale-housing.co.uk Mon Jul 10 21:34:42 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 298E79FB269 for ; Mon, 10 Jul 2006 18:34:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 77598-09 for ; Mon, 10 Jul 2006 18:34:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by postgresql.org (Postfix) with ESMTP id D7E039F97C2 for ; Mon, 10 Jul 2006 18:34:37 -0300 (ADT) Received: from mailgate.vale-housing.co.uk ([194.217.48.34] helo=vale-housing.co.uk) by anchor-post-30.mail.demon.net with esmtp (Exim 4.42) id 1G03Om-000Cwn-05 for pgsql-sql@postgresql.org; Mon, 10 Jul 2006 21:34:36 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: Re: MS-SQL<->Postgres sync Date: Mon, 10 Jul 2006 22:34:35 +0100 Message-ID: In-Reply-To: <1152558155.6540.18.camel@state.g2switchworks.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] MS-SQL<->Postgres sync thread-index: AcakaDD/CbCf3D0zQIugTnJ5CwZcmwAAEavA From: "Dave Page" To: "Scott Marlowe" , "Kevin Bednar" Cc: "Forums @ Existanze" , X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/161 X-Sequence-Number: 25735 =20 > -----Original Message----- > From: pgsql-sql-owner@postgresql.org=20 > [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Scott Marlowe > Sent: 10 July 2006 20:03 > To: Kevin Bednar > Cc: Forums @ Existanze; pgsql-sql@postgresql.org > Subject: Re: [SQL] MS-SQL<->Postgres sync >=20 > I think there's a version with windows support due out soon. =20 > Not sure, > since I don't run windows... just remember seeing it mentioned. Yes, full support for windows has been written already for the upcoming 1.2 release. Regards, Dave From cbbrowne@acm.org Tue Jul 11 01:04:16 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 99EA29FB26C for ; Mon, 10 Jul 2006 22:04:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 31304-01 for ; Mon, 10 Jul 2006 22:04:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 9AB6D9FB281 for ; Mon, 10 Jul 2006 22:04:06 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 380C530B4B; Tue, 11 Jul 2006 03:04:05 +0200 (MET DST) From: Chris Browne X-Newsgroups: pgsql.sql Subject: Re: MS-SQL<->Postgres sync Date: Mon, 10 Jul 2006 20:12:51 -0400 Organization: cbbrowne Computing Inc Lines: 32 Message-ID: <607j2lrocc.fsf@dba2.int.libertyrms.com> References: <20060710162520.GA4590@phlogiston.dyndns.org> <1152556251.6540.14.camel@state.g2switchworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:VPZvdID9hf0nWhRAEyX3/wiuZ5Y= To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/166 X-Sequence-Number: 25740 smarlowe@g2switchworks.com (Scott Marlowe) writes: > On Mon, 2006-07-10 at 11:25, Andrew Sullivan wrote: >> On Mon, Jul 10, 2006 at 11:27:52AM -0400, Kevin Bednar wrote: >> > Looking to keep 2 databases in sync, at least semi-realtime if possible, >> > although running a batch update every x mins wouldn't be out of the >> > question. One db is postgres and the other is ms-sql. It's to keep inventory >> > in sync from 2 seperate locations, one being a brick and mortar store and >> > the other an ecommerce system for a web site. Any and all help is >> > appreciated since I can't find much of anything on syncing these 2 database >> > systems! >> >> I don't think there's actually any product that does this right now, >> unless you're willing to use some sort of statement replica system >> (which means you have to deal with failures in one database and not >> another). Is the idea that this is multi-master? > > I wonder if it would be possible to write a set of triggers for MSSQL > that would allow you to run slony daemons that connected to it and a > postgresql server and did replication. Just mad scientisting for a > second. Someone went through the "mental gyrations" and figured it ought to be able to work for Oracle... It otta be able to work; the only thing is that I would think the only nodes that could be origins would be PostgreSQL nodes, because the way the data extraction scheme works is very much attuned to PostgreSQL's MVCC model... -- output = ("cbbrowne" "@" "cbbrowne.com") http://cbbrowne.com/info/lisp.html "I don't plan to maintain it, just to install it." -- Richard M. Stallman From ajs@crankycanuck.ca Tue Jul 11 13:18:00 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8EF7B9FA5BF for ; Tue, 11 Jul 2006 10:18:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 45873-04 for ; Tue, 11 Jul 2006 10:17:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 616369FA5B5 for ; Tue, 11 Jul 2006 10:17:51 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1G0IFa-0003it-7F for pgsql-sql@postgresql.org; Tue, 11 Jul 2006 09:26:06 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 6FDD94051; Tue, 11 Jul 2006 09:17:40 -0400 (EDT) Date: Tue, 11 Jul 2006 09:17:40 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: MS-SQL<->Postgres sync Message-ID: <20060711131740.GA7723@phlogiston.dyndns.org> References: <20060710162520.GA4590@phlogiston.dyndns.org> <1152556251.6540.14.camel@state.g2switchworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1152556251.6540.14.camel@state.g2switchworks.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/178 X-Sequence-Number: 25752 On Mon, Jul 10, 2006 at 01:30:51PM -0500, Scott Marlowe wrote: > > (which means you have to deal with failures in one database and not > > another). Is the idea that this is multi-master? > > I wonder if it would be possible to write a set of triggers for MSSQL > that would allow you to run slony daemons that connected to it and a > postgresql server and did replication. Just mad scientisting for a > second. Well, yes, but that's why I asked whether it's multimaster. Because if so, it'll be at least tricky to do under Slony I. A -- Andrew Sullivan | ajs@crankycanuck.ca Information security isn't a technological problem. It's an economics problem. --Bruce Schneier