[DB-SIG] Mirroring DBs with Python

Timothy Wilson wilson@visi.com
Sun, 9 Jul 2000 13:21:50 -0500 (CDT)

On Sun, 9 Jul 2000, Tom Bryan wrote:

> Very feasible, assuming that the speed of your link is fast enough to suck
> down the data you need.

We've got a T1 between the machines. That shouldn't be a problem.

> > Let's assume I've got Oracle running on Solaris at a remote site,
> > accessible via the Internet. 
> Hmm...does that mean that you have a user account on the database?  That
> is, can you login to the Oracle database yourself?

Well, presumably we would set up a user account on the Oracle database for
this purpose. I suspected that this would probably work, and since a couple
people have given the same opinion I'll dig in and figure out the specifics
with the folks who own the Oracle DB.

> There are multiple ways to accomplish this task, and the way you choose
> depends at least partially on the details of your situation.  Here's one
> example: 
> 1. You have Oracle for Linux installed on your machine.
> 2. You have Postgre/My-SQL for Linux installed on your machine.
> 3. You build DCOracle on your machine.
> 4. You bulid the Postgre/My-SQL Python extensions on your machine.
> 5. You write a Python program to 
>  a) log into the other database to extract the data
>  b) log into your database to populate the data

I don't really have enough details to figure out which is the best approach,
but I suspect that it would be easiest to run the query on the remote
machine and save the result to a flat text file that could be imported into
our local DB. 

> > Does this sound reasonable?
> Yes, depending upon which solution you choose.  The reasonable choice will
> make sense given your resources (hardware and bandwidth), your experience
> with Python and with databases, and the amount of data that you're trying
> to mirror.

Suffice it to say that this will be a good learning experience. :-)

Thanks to you and others who provided helpful feeback. I'll let you all know
how it works out.


Tim Wilson      | Visit Sibley online:         | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |                              | http://slashdot.org/
wilson@visi.com |   <dtml-var pithy_quote>     | http://linux.com/