Skip to content

Commit

Permalink
New sqlnet.ora conf file for timeout (TCP & OUTBOUND), set to 10 scds.
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinhardy committed Mar 10, 2021
1 parent b73cd79 commit 36131ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions OracleDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# -*- coding: utf-8 -*-

import logging, random, string, cx_Oracle

try:
cx_Oracle.init_oracle_client(config_dir="conf/")
except Exception as e:
logging.error("Impossible to load local configuration files in conf/: {0}".format(str(e)))


from Utils import areEquals,checkOracleVersion,getOracleConnection,ErrorSQLRequest
from progressbar import *
from time import sleep
Expand Down
2 changes: 2 additions & 0 deletions odat.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ def checkIfWorkingTnsListener(args, timeoutTCP=10):
logging.debug('Trying a TCP connection to {0} port {1}'.format(args['server'], args['port']))
try:
socks.connect((args['server'], args['port']))
logging.debug("Connection established to server")
except Exception as e:
args['print'].badNews("Impossible to establish a TCP connection to {0}:{1}. This target is SKIPPED".format(args['server'], args['port']))
return False
socks.close()
odb = OracleDatabase(args)
statusWorking = odb.isWorkingTnsListener()
if statusWorking == False:
Expand Down

0 comments on commit 36131ba

Please sign in to comment.