[cx-oracle-users] ping()
Brought to you by:
atuining
From: <prz...@po...> - 2011-01-17 12:59:52
|
Hello, I have been using ping() function to test reachability of some database: ... import cx_Oracle import sys from time import gmtime, strftime con = cx_Oracle.connect('user/pass@database') try: con.ping() except cx_Oracle.DatabaseError: #print "*** Connection dropped ***" STATUS = "DOWN" else: STATUS= "UP" con.close() print strftime("%Y-%m-%d %H:%M:%S", gmtime()), STATUS ... But it doesn't work - I have checked Oracle logs and it says "UP" even when database is down. What is wrong ? Regards Przemek ---------------------------------------------------------------- ZnajdĹş mieszkanie dla siebie - tak tanio jeszcze nie byĹo! SprawdĹş >> http://linkint.pl/f28e0 |