FAQ
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

Search Discussions

  • Bill Scherer at Mar 20, 2001 at 5:53 pm
    Fred -
    I've not used it with oracle v7, but DCOracle works very well with
    Oracle 8x.
    It is available as part of the ZOracleDA package for Zope
    (http://www.zope.org). You do not need to install zope to use it. Just
    get the ZOracleDA package and untar it. Follow the directions inside to
    build DCOracle, then put the DCoracle directory in your PYHTHONPATH.
    You will need a proper installation of the Oracle client to build
    DCOracle.

    Good luck.


    Fred Pacquier wrote:
    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
    --
    William K. Scherer
    Sr. Member of Applications Staff - Verizon Wireless
    Bill.Scherer_at_VerizonWireless.com
  • Cameron Laird at Mar 20, 2001 at 6:53 pm
    In article <mailman.985110929.20467.python-list at python.org>,
    Bill Scherer wrote:
    Fred -
    I've not used it with oracle v7, but DCOracle works very well with
    Oracle 8x.
    It is available as part of the ZOracleDA package for Zope
    (http://www.zope.org). You do not need to install zope to use it. Just
    get the ZOracleDA package and untar it. Follow the directions inside to
    build DCOracle, then put the DCoracle directory in your PYHTHONPATH.
    You will need a proper installation of the Oracle client to build
    DCOracle.
    .
    .
    .
    The short answer is, YES, you absolutely should be
    able to expect to get at an Oracle RDBMS hosted on
    a WNT box from anyplace on your network. Python
    has lots of ways to involve itself. DCOracle is a
    good one; just to get started, though, and to ex-
    perience some of this for yourself, you might
    experiment with command-line Oracle access from
    the Solaris workstation. Python can, of course,
    control Oracle that way.

    Yet another alternative is through ODBC drivers,
    which some people (to my surprise) seem to favor
    over DCOracle.
    --

    Cameron Laird <claird at NeoSoft.com>
    Business: http://www.Phaseit.net
    Personal: http://starbase.neosoft.com/~claird/home.html
  • Gkiffney at Mar 21, 2001 at 3:18 pm
    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ÜOracle.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/
  • Fred Pacquier at Mar 21, 2001 at 3:57 pm
    "gkiffney" <gkiffney at my-deja.com> said :
    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:
    Thanks for confirming this. DCOracle definitely sounds like the right
    candidate.

    Some will probably smile at this, but my first problem actually will be to
    get the Oracle client onto the Unix box. We have servers on NT and Unix,
    but unfortunately the "client = Windows" law applies here, too... :-)
  • Cameron Laird at Mar 21, 2001 at 5:03 pm
    In article <eE3u6.776$9%.203510 at newsr1.maine.rr.com>,
    gkiffney wrote:
    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,
    .
    .
    .
    Do you mean
    <URL: http://www.linuxworld.com/lw-2000-04/lw-04-oracle8i.html >?
    --

    Cameron Laird <claird at NeoSoft.com>
    Business: http://www.Phaseit.net
    Personal: http://starbase.neosoft.com/~claird/home.html
  • Fred Pacquier at Mar 21, 2001 at 5:11 pm
    claird at starbase.neosoft.com (Cameron Laird) said :
    In article <eE3u6.776$9%.203510 at newsr1.maine.rr.com>,
    gkiffney wrote:
    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,
    .
    Do you mean
    <URL: http://www.linuxworld.com/lw-2000-04/lw-04-oracle8i.html >?
    Excellent ! Thanks ! Truly scary though... :-))
  • Andreas Jung at Mar 21, 2001 at 10:10 pm
    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ÜOracle.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
  • Fred Pacquier at Mar 22, 2001 at 8:18 am

    "Andreas Jung" <andreas at andreas-jung.com> said :

    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.
    Thanks Andrea - the target database is O7 so probably the "old" one will
    do...
  • Andreas Jung at Mar 21, 2001 at 10:10 pm
    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ÜOracle.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
  • Bill Scherer at Mar 22, 2001 at 12:22 pm

    Andreas Jung wrote:
    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
    I'll note that the above is note strictly true. I use blobs with Oracle
    8.1.6 and DCOracle 1.3.(2?) all the time and it works fine. The syntax
    for this operation is probably not DB API compliant, but it does work. I
    have spoken with Matt about this and he is aware of it. I can only
    assume that clobs work similarly.

    - Bill

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 20, '01 at 5:14p
activeMar 22, '01 at 12:22p
posts11
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase