2.解压instantclient-basic-windows.x64-11.2.0.4.0.zip到c:\oracle
3.拷贝instantclient_11_2下所有.dll文件到c:\python34\Lib\site-packages\下(根据自己的python版本拷贝到相应的site-packages文件夹下)
python连接示例代码:
# -*- coding: utf-8 -*-import cx_Oracle conn=cx_Oracle.connect('reporter','password','localhost:1521/ORCL') cursor=conn.cursor() sql="select * from test"cursor.execute(sql) data=cursor.fetchall()print(data) cursor.close() conn测试数据mit() conn.close()
查看更多关于windows下python连接oracle数据库实例方法的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did84904