Christoph Zwerschke wrote:
Am 14.12.2011 16:05, schrieb jose soares:
No, The following line doesn't work:
sqlalchemy.create_engine("oracle://sfera:[email protected]:1521/shell").connect()
What is the output of cx_Oracle.makedsn('oracapusl.net', 1521, 'shell')?
-- Christoph
Take a look at this...
This one doesn't work:
import cx_Oracle as cx
dsn = cx.makedsn('172.16.100.226',1521,'SHELL')
cc = cx.connect('SFERACARTA', 'PASSWORD', dsn)
print cc.version
cursor = cc.cursor();
print cursor.execute("select * from dual").fetchone()
response:
cx_Oracle.DatabaseError: ORA-12505: TNS:listener does not
currently know of SID given in connect descriptor
===================================================================
but if I replace SID with SERVICE_NAME it works:
import cx_Oracle as cx
dsn =
cx.makedsn('172.16.100.226',1521,'SHELL').replace('SID','SERVICE_NAME')
cc = cx.connect('SFERACARTA', 'PASSWORD', dsn)
print cc.version
cursor = cc.cursor();
print cursor.execute("select * from dual").fetchone()
response:
11.2.0.3.0
('X',)
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.