Fri Aug-20-2004 13:53

Congrats on getting the green light on Python. I had a blast writing
my Python/Oracle app (a warehouse receiving automation project using
Symbol 6846 handheld computers/scanners)

I am in the middle of testing an upgrade from Oracle 8 to Oracle 9i.
DCOracle2 worked well with Oracle 8 (with one caveat - see below), and
after some finagling, DCOracle2 seems to be working well with Oracle

My recommendation:
Test ALL of your complicated stored procedure calls before deciding to
use DCOracle2. I had trouble with some stored procedure calls - it
failed when passing null on some IN/OUT parameters. I wrote some
wrapper procedures to workaround the problem, but it was a bit of a

DCOracle2 upgrade to Oracle 9i (
HP-UX B.11.00 U 9000/861/D270
Python 2.2.2

Oracle 8 installs 32-bit libraries in $ORACLE_HOME/lib and 64-bit
libraries in $ORACLE_HOME/lib64
Oracle 9i installs 64-bit libraries in $ORACLE_HOME/lib and 32-bit
libraries in $ORACLE_HOME/lib32

(At least, that was the way the DBA set it up on my box when he did
the upgrade)

This caused DCOracle2 to fail, since it was connecting to the 64-bit
version of libclntsh.sl instead of the 32-bit. libclntsh.sl is the
Oracle client library. On HP-UX, shared libraries have the sl
extension. On other platforms the file is called libclntsh.so

$ORACLE_HOME/lib/libclntsh.sl: Mismatched ABI. 64-bit PA shared
library found in 32-bit link.

I changed the Makefiles to point to the lib32 folder, and got it to

Here are the steps I used to get DCOracle2 working with Oracle 9i and
HP-UX 11. I used the latest version as of 8/19/04, which is available
from Zope CVS here:

Note that I am not using Zope. I'm just using DCOracle2 to connect my
application (written in Python) to Oracle 9i

Starting with the downloaded gzipped tarball, which I put in a
directory called /tmp/mra_depots

# Unpack and expand
gunzip DCOracle.tar.gz
tar -xvf DCOracle2.tar
cd DCOracle2

# Find and replace occurences of .so with .sl to match HP-UX
# naming conventions. See README-HP-UX file included
# in the distribution. Also, replace references to
# $ORACLE_HOME/lib with $ORACLE_HOME/lib32
vi Makefile
vi src/testora
vi src/Setup.in.dco
vi proof/Makefile
vi setup.py

# Now, build the DCOracle adapter and move it to the Python
# folder. You may need root privileges to move the
# adapter to the Python folder. NOTE: After the build, the
# original DCOracle2 folder contains another DCOracle2 folder.
rm -r /usr/local/lib/python2.2/DCOracle2
mv /tmp/mra_depots/DCOracle2/DCOracle2 /usr/local/lib/python2.2


This is a vi replacement command to replace $ORACLE_HOME/lib with


Breaking this vi command down for the benefit of vi virgins
: enter command entry mode
% search entire file
s replace
/ delimiter between 's' and search string
\ escape character for dollar sign to follow
$ORACLE_HOME\/lib search string, including escaped forward slash \/
(that's a \ and a / , not a V !)
/ delimiter between search string and replacement string
$ORACLE_HOME\/lib32 replacement string (we only need to escape the
forward slash here)
/ delimiter between replacement string and search options
g change every occurance in a line
c confirm changes

This will highlight each proposed change, and ask you to confirm.
Type y and hit enter for each one.

"Greg Lindstrom" <greg.lindstrom at novasyshealth.com> wrote in message news:<mailman.1856.1092831836.5135.python-list at python.org>...

I am running Python 2.3.3 on HP-UX and would like to access an Oracle 9i
database. Looking through the vaults, I see 4 or 5 modules that might work
and was wondering if anyone is currently hitting Oracle and what are you
using. I get to build a new system from the ground up and the powers that
be are allowing me to do it in Python. I'm quite happy.

Thanks for your help,


Greg Lindstrom (501) 975-4859
NovaSys Health greg.lindstrom at novasyshealth.com

"We are the music makers, and we are the dreamers of dreams" W.W.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
This email and any attachments to it are privileged and confidential and are
intended solely for use of the individual or entity to which they are
addressed. If the reader of this message is not the intended recipient, any
use, distribution, or copying of this communication, or disclosure of all or
any part of its content to any other person, is strictly prohibited. If you
have received this communication in error, please notify the sender by
replying to this message and destroy this message and delete any copies held
in your electronic files. Thank you.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 6 | next ›
Discussion Overview
grouppython-list @
postedAug 18, '04 at 12:23p
activeAug 20, '04 at 8:20p



site design / logo © 2022 Grokbase