def __init__(self, dm_user_name, dm_userpwd, dm_connectstring, tst_user_name, tst_userpwd, tst_connectstring): # oracle连接串 self.dm_conn = oracleconn(dm_user_name, dm_userpwd, dm_connectstring) self.tst_conn = oracleconn(tst_user_name, tst_userpwd, tst_connectstring) # 公共执行的cursor self.dm_cursor = self.dm_conn.cursor() self.tst_cursor = self.tst_conn.cursor() sqlfilename = os.path.join(configure.DOWNLOAD_FOLDER, '06AnalyzeScript.sql') self.sqlfilehandler = open(sqlfilename, 'w')
def __init__(self, user_name, userpwd, connectstring): # oracle连接串 self.conn = oracleconn(user_name, userpwd, connectstring) # 公共执行的cursor self.cursor = self.conn.cursor() sqlfilename = os.path.join(configure.DOWNLOAD_FOLDER, 'SqlData.sql') self.__logfile_name = 'SqlData.log' self.sqlfilehandler = open(sqlfilename, 'w') pass
def __init__(self,user_name, userpwd, connectstring,tablelist): self.__user_name = user_name self.__user_pwd =userpwd self.__connect_string = connectstring self.__table_list = tablelist # if connectstring != '': # conn = cx_Oracle.connect('{user_name}/{password}@{connstring}'.format(user_name=user_name,password=userpwd,connstring=connectstring)) # else: # conn = cx_Oracle.connect('{user_name}/{password}'.format(user_name=user_name,password=userpwd)) self.conn = oracleconn.oracleconn(user_name,userpwd,connectstring); # 公共执行的cursor self.cursor = self.conn.cursor()
def __init__(self, user_name, userpwd, connectstring): self.__user_name = user_name self.__user_pwd = userpwd self.__connect_string = connectstring # oracle连接串 self.conn = oracleconn.oracleconn(user_name, userpwd, connectstring) # 公共执行的cursor self.cursor = self.conn.cursor() #退出标志 self.__ODI_finish = False # SMS 发送标志 self.__SMS_SEND = True # 只运行一次nextval 语句的标志 self.__sequence_run_flag = False
def __init__(self, user_name, userpwd, connectstring, tablelist): self.__user_name = user_name self.__user_pwd = userpwd self.__connect_string = connectstring self.__table_list = tablelist # oracle连接串 self.conn = oracleconn.oracleconn(user_name, userpwd, connectstring) # 公共执行的cursor self.cursor = self.conn.cursor() sqlfilename = os.path.join(configure.DOWNLOAD_FOLDER, public_init_script.trigger_file_name) self.__logfile_name = public_init_script.trigger_file_name.split( '.')[0] + '.log' self.sqlfilehandler = open(sqlfilename, 'w') # 执行trigger的脚本列表,每生成一次增加一个,最后汇总生成一个执行脚本 self.__exec_script_list = []