Michael Bayer wrote:
On Dec 17, 2011, at 1:52 AM, jo wrote:
create_engine(oracle://user:password@SHELL)
could you tell me how it becomes in sqlalchemy.dburi on tg prod.cfg ?
sqlalchemy.dburi=oracle://username:password@host:port/service_name
I tried in this way:
Michael Bayer wrote:
On Dec 19, 2011, at 3:28 AM, jose soares wrote:
I tried as you said Michael and this is the error message:
sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12154: TNS:could not resolve
the connect identifier specified
I tried like so:
On Dec 19, 2011, at 10:17 AM, jose soares wrote:
Michael Bayer wrote:
On Dec 19, 2011, at 3:28 AM, jose soares wrote:
I tried as you said Michael and this is the error message:
sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12154: TNS:could not
resolve the connect identifier
Michael Bayer wrote:
On Dec 19, 2011, at 10:17 AM, jose soares wrote:
Michael Bayer wrote:
On Dec 19, 2011, at 3:28 AM, jose soares wrote:
I tried as you said Michael and this is the error message:
sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12154: TNS:could not
On Dec 19, 2011, at 10:43 AM, jose soares wrote:
this is my tnsnames.ora:
# tnsnames.ora Network Configuration File:
/usr/share/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_SICER =
(ADDRESS = (PROTOCOL =
Michael Bayer wrote:
On Dec 19, 2011, at 10:43 AM, jose soares wrote:
this is my tnsnames.ora:
# tnsnames.ora Network Configuration File:
/usr/share/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_SICER =
(ADDRESS =
On Dec 17, 2011, at 1:52 AM, jo wrote:
create_engine(oracle://user:password@SHELL)
could you tell me how it becomes in sqlalchemy.dburi on tg prod.cfg ?
sqlalchemy.dburi=oracle://username:password@host:port/service_name
I tried in this way:
In cx_oracle mailing list, they suggested me, this:
... write your own equivalent of makedsn, which really ought not be too hard.
You'd want to emit something like this:
I solved the problem using this monkeypatch to makedsn as suggested me
by Christoph Zwerschke.
makedsn = cx_Oracle.makedsn
cx_Oracle.makedsn = lambda *args, **kw: makedsn(*args,
**kw).replace('SID','SERVICE_NAME')
Thaks any way to everyone.
j
Michael Bayer wrote:
yeah I dunno, the
is that a known bug in cx_Oracle ?
On Dec 16, 2011, at 4:45 AM, jo wrote:
I solved the problem using this monkeypatch to makedsn as suggested me by
Christoph Zwerschke.
makedsn = cx_Oracle.makedsn
cx_Oracle.makedsn = lambda *args, **kw: makedsn(*args,
I don't know Michael, only that Craig Hagan in oracl...@freelists.org,
suggested me this workaround...
...However, I'm pretty sure that the problem is that you're depending
upon service names for your connection to succeed (that should be how
the url in your working example behaves), but the
On Dec 16, 2011, at 10:31 AM, jo wrote:
I don't know Michael, only that Craig Hagan in oracl...@freelists.org,
suggested me this workaround...
...However, I'm pretty sure that the problem is that you're depending upon
service names for your connection to succeed (that should be how the
Michael Bayer wrote:
On Dec 16, 2011, at 10:31 AM, jo wrote:
I don't know Michael, only that Craig Hagan in oracl...@freelists.org,
suggested me this workaround...
...However, I'm pretty sure that the problem is that you're depending upon
service names for your connection to succeed
Michael Bayer wrote:
is that a known bug in cx_Oracle ?
The latest version of cx_Oracle 5.1 is changed:
5) Added additional parameter service_name to makedsn() which can be
used to
use the service_name rather than the SID in the DSN string that is
generated.
makedsn(host =
I also tried two different connection mode.
The first one works but the second one using makedsn doesn't.
def init_db_conn(parms): #this work
import cx_Oracle
dburi=%(user)s/%(password)s@%(host)s:%(port)s/%(sid)s % parms
return cx_Oracle.connect(dburi)
def init_db_conn(parms): #this
so makedsn() will give you:
cx_Oracle.makedsn(oracapsul.net, 1521, SHELL)
'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracapsul.net)(PORT=1521)))(CONNECT_DATA=(SID=SHELL)))'
and that should match in your tnsnames.ora file
($ORACLE_HOME/network/admin/tnsnames.ora). would have
Ok, I changed the file $ORACLE_HOME/network/admin/tnsnames.ora but it
still doesn't work.:
sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener
does not currently know of SID given in connect descriptor
None None
# tnsnames.ora Network Configuration File:
yeah I dunno, the problem is at the cx_Oracle / OCI level at this point,
since you can illustrate cx_Oracle/makedsn() not working. You might need to
ask on their list at this point (only give them the init_db_conn() scripts,
don't give them any SQLalchemy stuff):
Hi all,
I'm trying to connect to an oracle db using sqlalchemy with turbogears1
and I get this error:
sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener
does not currently know of SID given in connect descriptor
I tried making the connection using cs_Oracle and it
On Dec 13, 2011, at 11:16 AM, jose soares wrote:
Hi all,
I'm trying to connect to an oracle db using sqlalchemy with turbogears1 and I
get this error:
sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does
not currently know of SID given in connect descriptor
20 matches
Mail list logo