Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-19 Thread jose soares
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:

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-19 Thread jose soares
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:

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-19 Thread Michael Bayer
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-19 Thread jose soares
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-19 Thread Michael Bayer
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 =

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-19 Thread jose soares
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 =

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-17 Thread Michael Bayer
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:

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
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:

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread Michael Bayer
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,

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread Michael Bayer
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
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 =

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-14 Thread jose soares
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-14 Thread Michael Bayer
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-14 Thread jose soares
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:

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-14 Thread Michael Bayer
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):

[sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-13 Thread jose soares
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

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-13 Thread Michael Bayer
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