[DB-SIG] pb in connect call with cx_Oracle

Andy Todd andy47 at halfcooked.com
Thu Oct 16 06:03:12 EDT 2003

dbsig wrote:

> Hi,
> When calling cx_Oracle.connect(), I get the exception:
> "RuntimeError: Unable to acquire Oracle environment handle"
> Does anyone know what this error mean ? I'm a total newbie regarding Oracle 
> management (I've just installed it for the first time and tried to connect with 
> Python), so that may be a stupid thing I did / didn't do. Connecting to my 
> database with the console enterprise manager do work, however. Also, I started 
> all the Oracle services I could, in case it would help (but it didn't)...
> I'm using cx_Oracle V3.1, Oracle personal edition V9. with server and 
> client tools installed.

I'm presuming that you are working on Windows (presumably Windows 2000 
or XP).

Firstly you need to check that your Oracle set up is working correctly. 
If you open a DOS window and type 'sqlplus' what happens? Does the tool 
start? And can you then connect to your database? If you can connect can 
you run any queries? Can you connect to your database using an alias? 
That is, instead of just specifying username/password as your connect 
string you specify username/password at dbname.

If the answers to all of these questions are yes, then your Oracle 
database is probably set up correctly. Then can we look at your 
cx_Oracle problems. It would probably help if you include some lines 
from a interactive Python session showing what you type and the errors 
you are seeing in context.

 From the desk of Andrew J Todd esq - http://www.halfcooked.com/

More information about the DB-SIG mailing list