[英]Which version of Oracle Client should I install?
我需要在Oracle 9i数据库中使用Python运行一些SQL查询,为此我应该安装哪个版本的Oracle。 我在Windows 10计算机上使用cx_Oracle和Python 3.7。
我收到此错误消息:“ cx_Oracle.DatabaseError:DPI-1047:无法加载64位Oracle客户端库:”
您需要oracle客户端11或10。Oracle客户端12无法连接到oracle 9i。 oracle客户端库必须是32位或64位,与您的Python体系结构匹配。
C:\oracle\instantclient_12_2>.\sqlplus.exe scott/tiger@test
SQL*Plus: Release 12.2.0.1.0 Production on Thu Feb 7 14:39:09 2019
Copyright (c) 1982, 2017, Oracle. All rights reserved.
ERROR:
ORA-03134: Connections to this server version are no longer supported.
Enter user-name:
C:\oracle\instantclient_11_2>.\sqlplus.exe scott/tiger@test
SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 7 14:39:58 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL>
最新版本的cx_Oracle需要11.2或更高版本的Oracle客户端库。 幸运的是,Oracle客户端11.2将连接到Oracle DB 9.2和更高版本的DB。 从错误消息中,您需要一个64位版本,可以使用免费的Oracle Instant Client获得该版本。
查看cx_Oracle安装手册一节“ Oracle客户端和Oracle数据库的互操作性” 。
如果您不熟悉cx_Oracle,请查看教程和示例 。 cx_Oracle运行单个SQL语句; 它不运行SQL * Plus脚本(带有多个语句)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.