473,387 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Mirroring tables from Oracle to Postgresql

Hi there,

First of all, I suppose my problem should be at least farly common, but
haven't had luck trying to find what I need by searching on the docs,
google, etc. So please if this issue has already been covered please
point me to some URL, or the list archives, or what you think is fine.

My issue is that I need to do some replication from Oracle tables to
PSQL. One-way only, incremental, and to a remote machine.

I've been suggested to do a triggered procedure in Oracle so that
everytime a file is inserted, deleted or updated, a perl script is run
which modifies in turn the PSQL DB.

I'd like to know if this is the proper approach, and also if someone
else has done anything similar (this is for office work, and the bosses
would feel more comfortable with a pre-fabricated solution that with
some quick hacking of mine, even if it's the same stuff ;). If there
isn't previous work, doing the hacking is still fine. What do you
recommend me?

Thanks in advance,

Miguel
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #1
5 2434
Hello Miguel,

On Monday 05 April 2004 15:58, Miguel Guzman Miranda wrote:
My issue is that I need to do some replication from Oracle tables to
PSQL. One-way only, incremental, and to a remote machine.


I have to replicate a lot of data from Oracle/MS SQL/Progress to PostgreSQL
I have written an Java library which synchronize the data from a database to
another database and do some usefull things if a record was
inserted/changed/deleted. In our situation, we synchronize once a day.

At the moment I'm rewritting the library to use Metadata.

Regards,
Cees.

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

http://archives.postgresql.org

Nov 23 '05 #2
On Mon, Apr 05, 2004 at 03:58:36PM +0200, Miguel Guzman Miranda wrote:
I've been suggested to do a triggered procedure in Oracle so that
everytime a file is inserted, deleted or updated, a perl script is run
which modifies in turn the PSQL DB.


If you go to gborg and get the latest erserver code, you could
probably use that as a base. It works pretty much as you described.
At the moment, it is designed to use Postgres as the master, but I've
been thinking about it lately, and it strikes me that it could be
modified to use other RDBMS. Since the data is pushed around using
JDBC, I suspect that it could be modified to sync any systems for
which you have a JDBC driver. Some work will be required for that,
though. In particular, it depends on the Postgres system tables, so
you'd have to figure out how to fix that.

Note that it does not do DDL, and it imposes a noticable cost to
transactions on the master database.

A

--
Andrew Sullivan | aj*@crankycanuck.ca

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #3

The java code is reasonably agnostic, provided the JDBC driver is smart
enough to
deal with any datatype properly as strings, although that intelligence
can be added.
Something else as a slave would be considerable easier, of course. For
something
else to be the master, you would have to find a way to mimic the
trigger code to make
the entry into the _rserve_log_?_ tables.

On Apr 16, 2004, at 8:17 AM, Andrew Sullivan wrote:
On Mon, Apr 05, 2004 at 03:58:36PM +0200, Miguel Guzman Miranda wrote:
I've been suggested to do a triggered procedure in Oracle so that
everytime a file is inserted, deleted or updated, a perl script is run
which modifies in turn the PSQL DB.


If you go to gborg and get the latest erserver code, you could
probably use that as a base. It works pretty much as you described.
At the moment, it is designed to use Postgres as the master, but I've
been thinking about it lately, and it strikes me that it could be
modified to use other RDBMS. Since the data is pushed around using
JDBC, I suspect that it could be modified to sync any systems for
which you have a JDBC driver. Some work will be required for that,
though. In particular, it depends on the Postgres system tables, so
you'd have to figure out how to fix that.

Note that it does not do DDL, and it imposes a noticable cost to
transactions on the master database.

A

--
Andrew Sullivan | aj*@crankycanuck.ca

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
ma*******@postgresql.org)

--------------------

Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #4
Andrew Rawnsley wrote:
The java code is reasonably agnostic, provided the JDBC driver is smart
enough to
deal with any datatype properly as strings, although that intelligence
can be added.
Something else as a slave would be considerable easier, of course. For
something
else to be the master, you would have to find a way to mimic the
trigger code to make
the entry into the _rserve_log_?_ tables.
Not only that. I was wondering how exactly a "snapshot" would be defined
in Oracle. I don't know if there are things like minxid, maxxid and xip
in any other DB than PostgreSQL.
Jan

On Apr 16, 2004, at 8:17 AM, Andrew Sullivan wrote:
On Mon, Apr 05, 2004 at 03:58:36PM +0200, Miguel Guzman Miranda wrote:
I've been suggested to do a triggered procedure in Oracle so that
everytime a file is inserted, deleted or updated, a perl script is run
which modifies in turn the PSQL DB.


If you go to gborg and get the latest erserver code, you could
probably use that as a base. It works pretty much as you described.
At the moment, it is designed to use Postgres as the master, but I've
been thinking about it lately, and it strikes me that it could be
modified to use other RDBMS. Since the data is pushed around using
JDBC, I suspect that it could be modified to sync any systems for
which you have a JDBC driver. Some work will be required for that,
though. In particular, it depends on the Postgres system tables, so
you'd have to figure out how to fix that.

Note that it does not do DDL, and it imposes a noticable cost to
transactions on the master database.

A

--
Andrew Sullivan | aj*@crankycanuck.ca

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
ma*******@postgresql.org)

--------------------

Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

--
#================================================= =====================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================= = Ja******@Yahoo.com #
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #5
Andrew Rawnsley wrote:
The java code is reasonably agnostic, provided the JDBC driver is smart
enough to
deal with any datatype properly as strings, although that intelligence
can be added.
Something else as a slave would be considerable easier, of course. For
something
else to be the master, you would have to find a way to mimic the
trigger code to make
the entry into the _rserve_log_?_ tables.
Not only that. I was wondering how exactly a "snapshot" would be defined
in Oracle. I don't know if there are things like minxid, maxxid and xip
in any other DB than PostgreSQL.
Jan

On Apr 16, 2004, at 8:17 AM, Andrew Sullivan wrote:
On Mon, Apr 05, 2004 at 03:58:36PM +0200, Miguel Guzman Miranda wrote:
I've been suggested to do a triggered procedure in Oracle so that
everytime a file is inserted, deleted or updated, a perl script is run
which modifies in turn the PSQL DB.


If you go to gborg and get the latest erserver code, you could
probably use that as a base. It works pretty much as you described.
At the moment, it is designed to use Postgres as the master, but I've
been thinking about it lately, and it strikes me that it could be
modified to use other RDBMS. Since the data is pushed around using
JDBC, I suspect that it could be modified to sync any systems for
which you have a JDBC driver. Some work will be required for that,
though. In particular, it depends on the Postgres system tables, so
you'd have to figure out how to fix that.

Note that it does not do DDL, and it imposes a noticable cost to
transactions on the master database.

A

--
Andrew Sullivan | aj*@crankycanuck.ca

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
ma*******@postgresql.org)

--------------------

Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

--
#================================================= =====================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================= = Ja******@Yahoo.com #
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Christian Traber | last post by:
Hi, I'll try to switch from Oracle to postgres for some small applications. Is it possible to build functions like Oracle's nvl or decode with pgplsql? How can I make a function like nvl that...
1
by: Eric | last post by:
Hi, I would like to know if a daemon exist to intercept Oracle queries and translate to postgresql query... I have a windows app (AccPac) that connect to an Oracle server via ODBC. I would...
57
by: Bing Wu | last post by:
Hi all, I am running a database containing large datasets: frames: 20 thousand rows, coordinates: 170 million row. The database has been implemented with: IBM DB2 v8.1
5
by: dave71 | last post by:
Hi Could someone please advise me how to remove the schema name from linked tables within Access. For example when I connect to a Oracle database via Microsoft ODCB for Oracle the list of...
2
by: Sally Sally | last post by:
Does anyone know of a good way of implementing postgres real-time mirroring? Whether it's a program that's already out there or whether it is something that can be done by the DBA? I know there is...
4
by: Steve | last post by:
Hi, I've been running postgres on my server for over a year now and the tables have become huge. I have 3 tables that have data over 10GB each and these tables are read very very frequently. In...
4
by: Glen Eustace | last post by:
I thought I had seen something that indicated that v8 was going to provide a means to mirror databases without needing all the triggers etc. I downloaded beta 3 but couldn't see anything that would...
2
by: Nadeem Bitar | last post by:
I've searched unsuccessfully on google and the archives for a technical comparison of Oracle and PostgreSQL. Is there any free and recent comparison that covers more than just the basic...
2
by: abbeyro | last post by:
Hello, I'm trying to retrieve a list of tables from all_tables in a given Oracle db. I'm using System.Data.OracleClient, OracleCommand and OracleDataReader and I always obtain the results in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.