python远程连接oracle数据库总结
1. python 连接数据库代码:
def oracledbConnect(self):
try:
conn = cx_Oracle.connect("mdm","netqin123","192.168.33.160:1521/dex")
cursor = conn.cursor()
cursor.execute("""select * from t_user""")
one = cursor.fetchall()
for row in one:
print row
cursor.close()
conn.commit();