Oracle Access via cx_Oracle

Greg Lindstrom greg.lindstrom at novasyshealth.com
Tue Sep 28 12:19:00 EDT 2004


Hello
-
I am trying to connect to an Oracle database on an HP-9000 via Python 2.3
and cx_Oracle.  I have set the following in my python routine:

os.putenv('ORACLE_HOME', '/u01/app/oracle')
os.putenv('ORA_NLS',
'/u01/app/oracle/product/9.2.0/ocommon/nls/admin/data')
os.putenv('ORACLE_TERM', 'xterm')
os.putenv('ORACLE_SID',  'test1')
os.putenv('ORACLE_DOC',  '/u01/app/oracle/product/9.2.0/doc')

and then
myIP = "ww.xx.yy.zzz"
myPort = nnnn
myDsn = cx_Oracle.makedsn(myIP, myPort, 'test1')
print partition
oracle = cx_Oracle.connect(myUid, myPwd, myDsn)

but am told

File "g.py", line 16, in ?
    oracle = cx_Oracle.connect(myIP, myPwd, 'test1')
RuntimeError: Unable to acquire Oracle environment handle

can you see what I've done wrong?

Thanks for your help,
--greg



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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -




More information about the Python-list mailing list