I have a question about Z Oracle Database Connections. I am the unhappy owner of a new responsibility of maintaining an existing install of Zope. Originally it was working fine and now the connections drop one by one and will not come back up. Through a manage screen I can see that the connection is closed. I can click on the Open Connection button but it errors. The error is as follows: ******************************** Your action caused an unknown error to occur. <!-- Error Type: BadRequest Traceback: Traceback (innermost last): File /mnt/disk1/Z1/Z3/lib/python/ZPublisher/Publish.py, line 171, in publish File /mnt/disk1/Z1/Z3/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_open_connection) File /mnt/disk1/Z1/Z3/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_open_connection) File /mnt/disk1/Z1/Z3/lib/python/Shared/DC/ZRDB/Connection.py, line 220, in manage_open_connection (Object: RoleManager) File /mnt/disk1/Z1/Z3/lib/python/Shared/DC/ZRDB/Connection.py, line 240, in connect (Object: RoleManager) File /mnt/disk1/Z1/Z2/lib/python/Products/ZOracleDA/db.py, line 124, in __init__ File /usr/local/lib/python1.5/site-packages/DCOracle/ocidb.py, line 77, in __init__ BadRequest: <strong>Invalid connection string: </strong><CODE>username/password@server</CODE><br> OracleError (12154, 'ORA-12154: TNS:could not resolve service name') ******************************** Now by looking at it I initially thought that it was an oracle problem. However out oracle admin showed me that she could log into that same box and use sqlplus and get data back. I have to now look into how to trouble shoot either ZOracleDA or DCOracle. Has anyone ran into these Database Connection strings suddenly failing? The only luck that I have had was by bouncing the servers they will all come up fine, but then after a matter of minutes they all drop one by one again. The tnsnames.ora file has not changed location and (I hate when people say this because I doubt them) nothing has changed that I am aware of. It just started dropping the connections. Any help is greatly appreciated. Thanks in advance -John Wormington
On Tue, 26 Jun 2001, John Wormington wrote:
BadRequest: <strong>Invalid connection string: </strong><CODE>username/password@server</CODE><br>
OracleError (12154, 'ORA-12154: TNS:could not resolve service name') ********************************
Now by looking at it I initially thought that it was an oracle problem. However out oracle admin showed me that she could log into that same box and use sqlplus and get data back. I have to now look into how to trouble shoot either ZOracleDA or DCOracle. Has anyone ran into these Database Connection strings suddenly failing?
To start debugging the problem, wrote a simple Python program and try to connect to the server. Something like this: #! /usr/local/bin/python -O jwt = None import os os.environ["ORACLE_HOME"] = "/usr/local/oracle/app/oracle/product/8.0.5" os.environ["NLS_LANG"] = "AMERICAN_AMERICA.CL8KOI8R" # Russian Cyrillic KOI8-R def jwt_connect(login="xxx", password="yyy", SID="jwt"): global jwt from DCOracle import Connect jwt = Connect("%s/%s@%s" % (login, password, SID)) jwt_connect() import sys cursor = jwt.cursor() format = "%s | "*13 + "%s\n" cursor.execute("SELECT * FROM sides_view") while 1: olist = cursor.fetchmany(10) if not olist: break for row in olist: sys.stdout.write(format % row) cursor.close() jwt.close() Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
John Wormington -
Oleg Broytmann