Hi, I need help in setting up Oracle under TG/sqlalchemy environment. I believe the issue is more of a SQLAlchemy issue and that is why i am posting here.
Here's what i have done. 1.Installed TG2 and Sqlalchemy. 2.Installed Oracle Express 10g. 3.confirmed that I am able to access oracle using Sqlplus. 4.Installed cx_Oracle. 5.Wrote short test program in python to access my database using cx_Oracle.The program worked fine. Here's the test program. import pkg_resources pkg_resources.require("cx-Oracle>=5.0.3") import cx_Oracle connstr='<username>/<password>@localhost' conn = cx_Oracle.connect(connstr) curs = conn.cursor() curs.execute('select * from tabs') print curs.description print curs.fetchone() conn.close() 6.started my application after configuring it for Oracle Express. 7.Here's the error I got. File "/root/tg2env/lib/python2.4/site-packages/ SQLAlchemy-0.5.6-py2.4.egg/sqlalchemy/engine/base.py", line 1229, in contextual_connect return self.Connection(self, self.pool.connect(), close_with_result=close_with_result, **kwargs) File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 142, in connect return _ConnectionFairy(self).checkout() File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 304, in __init__ rec = self._connection_record = pool.get() File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 161, in get return self.do_get() File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 639, in do_get con = self.create_connection() File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 122, in create_connection return _ConnectionRecord(self) File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 198, in __init__ self.connection = self.__connect() File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/pool.py", line 261, in __connect connection = self.__pool._creator() File "/root/tg2env/lib/python2.4/site-packages/SQLAlchemy-0.5.6- py2.4.egg/sqlalchemy/engine/strategies.py", line 80, in connect raise exc.DBAPIError.instance(None, None, e) sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor None None 8. Here are the .ORA files. TNSNAMES.ora # tnsnames.ora Network Configuration File: XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521)) CONNECT_DATA = (SID = XE)) ) sqlnet.authentication_services = (NONE) LISTENER.ORA # listener.ora Network Configuration File: SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /usr/lib/oracle/xe/app/ oracle/product/10.2.0/server) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = m...@localhost) (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/ product/10.2.0/server) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521)) ) ) DEFAULT_SERVICE_LISTENER = (XE) SQLNET.ORA This is the uncommented line in the sqlnet.ora 9.On googling ,I saw someone indicate that sql.authentication should be set to none. I did that but no avail. I would really appreciate any help in resolving this problem. Thanks. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.