[cx-oracle-users] feature request for cx_Oracle.makedsn function
Brought to you by:
atuining
From: Ivan <bd...@ma...> - 2011-07-12 10:00:42
|
I have a simple python script: tsn_dsn = cx_Oracle.makedsn('10.100.1.21', 1521, 'SID') import cx_Oracle connection = cx_Oracle.connect(user, password, tsn_dsn ) connection.close() if ip 10.100.1.21 doesn't exists in network script waiting 60 seconds. (DEFAULT CONNECT_TIMEOUT to Oracle.). I want to decrease this time. If I use script: dns_tns = '(DESCRIPTION=(CONNECT_TIMEOUT=5)(RETRY_COUNT=0)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=%d)))(CONNECT_DATA(SID=%s)))' % (.... )) connection = cx_Oracle.connect(user, password, tsn_dsn ) it's solve my problem. May be add CONNECT_TIME option to cx_Oracle.makedsn function as optional parametr ? |