[Zope-DB] DCOralcle2 "Invalid connection string"

Emily Stumpf evstumpf at ucdavis.edu
Wed Dec 1 12:21:36 EST 2004


I need to get DCOracle2 working in zope and its not. :(

Finally I was able to get sqlplus on the webserver to connect 
successfully to my DB (not on the local machine) when I figured out that 
it was looking for tnsnames.ora in a slightly different place then I had 

Okay, so here's the problem in zope:

When I try to create a DCOracle2 connection with connection string in 
this format login/password at DB where DB is set in tnsnames.ora (located 
in $ORACLE_HOME/network/admin/tnsnames.ora and now also in 
/etc/tnsnames.ora :P), I get "Invalid connection string"

Ok, and I just now noticed that sqlplus works with that connection 
string when ORACLE_HOME is Not set, but when I set it, it says:

SP2-0642: SQL*Plus internal error state 2165, context <bignumber>:0:0
Unable to proceed

?? Ahh :( What a mess..

Some information about this system:
OS: Linux Redhat Enterprise Workstation 3 Update 2 (2.4.21-20.EL)

DCOracle2 version: Tried with 1.3beta, and trying now with 1.2 but same 

Oracle: Oracle10g-basic-instantclient+some additional header files from 
a full Oracle 10g install from a different machine. So ORACLE_HOME is 
located in: /usr/lib/oracle/ and it contains the 
following directories:
bin lib network rdbms

rdbms was the directory of header files and contains a dir called public 
with a bunch of .h files.

How I compiled dco2.so:
For awhile I had trouble with getting this to compile at all. I think 
the combination that caused it to compile was putting that rdbms dir in 
$ORACLE_HOME, in src/dco2.c changing all instances of "dword *" to 
"dvoid *" and running "python setup.py install".

Was trying to test it with test/test1.py which I modified to:
import dco2

and I always get:
OCIEnvCreate failed: src/dco2.c:1497Traceback (most recent call last):
   File "test1.py", line 3, in ?
     db = dco2.connect("username","pw","DB")
dco2.DatabaseError: (67, '\xe0\xebV\xb7\xe0\xebV\xb7')

Interesting is if I run zope from /usr/local/zope/instance/bin/runzope I 

OCIEncCreate failed: src/dco2.c 1497

If anyone has any ideas, or if I should have given some information that 
I didn't please let me know asap.

-- Emily

More information about the Zope-DB mailing list