checkmesft.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:wechat_oms 作者: bsbforever 项目源码 文件源码
def oraclesql():
    ipaddress='10.65.1.120'
    username='sys'
    password='ase_sys_n'
    port='1521'
    tnsname='dctest'
    try:
        db = cx_Oracle.connect(username+'/'+password+'@'+ipaddress+':'+port+'/'+tnsname ,mode=cx_Oracle.SYSDBA)
    except Exception as e:
        content= (tnsname+' is Unreachable,The reason is '+ str(e)).strip()
        print (content)
    else:
        cursor = db.cursor()
        data=oraclesql(cursor)
        cursor.close()
        db.close()

    cursor.execute('select max(count(*))  from v$open_cursor group by sid')
    data=cursor.fetchone()
    return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号