I have had success with the following connection string: db = DAL('oracle://user/password@sid')
I tried out the alternate form you used: db = DAL('oracle://user/password@server:port/service_name') And it worked successfully. When I used a bad password or a bad service_name I saw a similar error to what you reported: Traceback (most recent call last): File "/home/tomt/web2py/gluon/restricted.py", line 194, in restricted exec ccode in environment File "/home/tomt/web2py/applications/scadadb/models/db.py", line 17, in <module> db = DAL('oracle://user/password@server:port/service_name') File "/home/tomt/web2py/gluon/dal.py", line 4156, in __init__ raise RuntimeError, "Failure to connect, tried %d times:\n%s" % (attempts, error) RuntimeError: Failure to connect, tried 5 times: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor - Tom On Mar 6, 10:38 am, Lazarof <lazaro...@gmail.com> wrote: > Hi! > > Are you sure that > 3. db = DAL("oracle://ricardo/rica...@10.10.1.84:1521/XE") > and not > 3. db = DAL("oracle://ricardo/password@XE") > > On Mar 6, 6:21 pm, Bruno Rocha <rochacbr...@gmail.com> wrote: > > > Does anybody knows something about this? > > > it connects with cx_oracle and raw queries, but gives this error on DAL. > > > 1. Traceback (most recent call last): > > 2. File "<pyshell#19>", line 1, in <module> > > 3. db = DAL("oracle://ricardo/rica...@10.10.1.84:1521/XE") > > 4. File "C:\Python27\lib\site-packages\gluon\dal.py", line 5968, in > > __init__ > > 5. raise RuntimeError, "Failure to connect, tried %d times:\n%s" % ( > > attempts, tb) > > 6. RuntimeError: Failure to connect, tried 5 times: > > 7. Traceback (most recent call last): > > 8. File "C:\Python27\lib\site-packages\gluon\dal.py", line 5955, in > > __init__ > > 9. self._adapter = ADAPTERS[self._dbname](*args) > > 10. File "C:\Python27\lib\site-packages\gluon\dal.py", line 2185, in > > __init__ > > 11. self.pool_connection(connect) > > 12. File "C:\Python27\lib\site-packages\gluon\dal.py", line 465, in > > pool_connection > > 13. self.connection = f() > > 14. File "C:\Python27\lib\site-packages\gluon\dal.py", line 2184, in > > connect > > 15. return self.driver.connect(uri,**driver_args) > > 16. DatabaseError: ORA-12514: TNS:listener does not currently know of > > service requested in connect descriptor > > > -- > > > Bruno Rocha > > [http://rochacbruno.com.br] > >