problem connecting to oracle database

markusjais at markusjais at
Fri Mar 5 14:23:34 CET 2004


I hava a small Perl and a small Python CGI Skript.

I have Python 2.3.3 and the newest cx_Oracle module.

this is the error in my httpd_error.log

RuntimeError: Unable to acquire Oracle environment handle

at the start of the skript I set
os.environ["ORACLE_HOME"] = "/opt/oracle/OraHome1/"

this is the same as in the Perl skript and there it works.

this is the code how I connect:
    connection = cx_Oracle.connect(user, passwd, "host.of.db.server") 
    cursor = connection.cursor()
except cx_Oracle.Error, e:
    print "Error %s" % e
    sys.exit (1)

the host of the db server is correct and a test skript on another machine
with another db worked, too.

any ideas what is wrong here ?


More information about the Python-list mailing list