By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,526 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,526 IT Pros & Developers. It's quick & easy.

Access to Oracle

P: n/a
Greetings-

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

Greg Lindstrom (501) 975-4859
NovaSys Health gr************@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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Greg Lindstrom <gr************@novasyshealth.com> wrote:
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.


We're using cx_Oracle, primarily for Oracle 8i on Solaris but we
also target W2K. Testing with 9i should currently be in progress,
and I've had no problems reported so far....

--
\S -- si***@chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomež se bera eadward ofdun hlęddre heafdes bęce bump bump bump
Jul 18 '05 #2

P: n/a
We are using python 2.3 with cx_oracle on HP-ux
originally built againt 8i libraries, works fine to access
our db upgraded to 9i2

http://www.computronix.com/utilities.shtml#Oracle
Jul 18 '05 #3

P: n/a

I'm using cx_Oracle on Windows XP to communicate with 9i. Works quite
nicely. One nice thing is that, by being careful with the design (esp. the
SQL generation), I'm able to bring the application to a PostgreSQL machine
running Linux and things still work! But that's a little off-topic.

Russell.

Jul 18 '05 #4

P: n/a
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
9i
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
pain.

DCOracle2 upgrade to Oracle 9i (9.2.0.3)
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
work.

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:
http://cvs.zope.org/Products/DCOracl...r.gz?tarball=1.

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
:%s/\.so/.sl/gc
:wq
vi src/testora
:%s/\.so/.sl/gc
:%s/\$ORACLE_HOME\/lib/$ORACLE_HOME\/lib32/gc
:wq
vi src/Setup.in.dco
:%s/\/lib/\/lib32/gc
:wq
vi proof/Makefile
:%s/\/lib/\/lib32/gc
:wq
vi setup.py
:%s/"lib"/"lib32"/gc
:wq

# 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.
# MOVE THE INNERMOST DCOracle2 folder, NOT THE OUTER ONE!
make
su
rm -r /usr/local/lib/python2.2/DCOracle2
mv /tmp/mra_depots/DCOracle2/DCOracle2 /usr/local/lib/python2.2
exit

Notes:

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

:%s/\$ORACLE_HOME\/lib/$ORACLE_HOME\/lib32/gc
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" <gr************@novasyshealth.com> wrote in message news:<ma**************************************@pyt hon.org>...
Greetings-

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

Greg Lindstrom (501) 975-4859
NovaSys Health gr************@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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.