Accessing Oracle from Python remotely ?

Andreas Jung andreas at andreas-jung.com
Wed Mar 21 17:10:31 EST 2001


 There are currently two different DCOracle versions available. DCOracle
1.3.x
supports is mostly build on top of Oracle 7 but I works although with Oracle
8i
except features like BLOBs and CLOBs. When you need complete support
for Oracle 8i take a look at Matt Kromers new version of DCOracle 2. It is
still alpha so be warned :-) You can find DCO2 on www.zope.org  - search for
DCO2.

Andreas Jung
Digital Creations

"gkiffney" <gkiffney at my-deja.com> schrieb im Newsbeitrag
news:eE3u6.776$9%.203510 at newsr1.maine.rr.com...
> There's http://www.zope.org/Products/DCOracle which should get you
started.
> There was an article by Uche Ogbuji in Linuxworld that helped me get going
> with this, but it's apparently fallen off the Internet map into the bit
> bucket.  Using the dcoracle module (which is a bit of a pain to get going,
> look at the Zope docs carefully, and if you can find the prebuilt dll's,
use
> those), you can do things like this:
>
> [uche at malatesta uche]$ python
> Python 1.5.1 (#1, Sep 3 1998, 22:51:17) [GCC 2.7.2.3] on linux-i386
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import DCOracle
> >>> #connect to DB. scott/tiger are the test database username/password
> >>> dbc=DCOracle.Connect("scott/tiger at sforza") #sforza is the local Oracle
> server
> >>> c = dbc.cursor()
> >>> c.execute("SELECT * FROM emp WHERE emp.deptno = 10")
> >>> rows = c.fetchall()
> >>> print rows
> [(7782, 'CLARK', 'MANAGER', 7839, dbiDate('1981-06-09 00:00:00'), 2450.0,
> None, 10),
> (7839, 'KING', 'PRESIDENT', None, dbiDate('1981-11-17 00:00:00'), 5000.0,
> None, 10),
> (7934, 'MILLER', 'CLERK', 7782, dbiDate('1982-01-23 00:00:00'), 1300.0,
> None, 10)]
>
>
>
> "Fred Pacquier" <fredp at mygale.org.nospam> wrote in message
> news:Xns906AB9C901807PaCmAnRDLM at 161.48.76.20...
> > Hi,
> >
> > I have an Oracle (7) database running on a Windows NT 4 server. Is it
> > possible (easy, difficult ?) to read the data in those tables from a
> python
> > script running on a remote Unix (Solaris) box ?
> >
> > Sorry if the question is silly -- I do know a bit of python but I'm
> > inexperienced in databases and their connectivity. Any pointers welcome
> > though.
> >
> > Thanks,
> > fp
> >
> > --
> > YAFAP : http://www.multimania.com/fredp/
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list