简体   繁体   English

我应该安装哪个版本的Oracle Client?

[英]Which version of Oracle Client should I install?

I need to run some SQL queries using Python in Oracle 9i database, Which version of Oracle I should install for this purpose. 我需要在Oracle 9i数据库中使用Python运行一些SQL查询,为此我应该安装哪个版本的Oracle。 I am using cx_Oracle and Python 3.7 on Windows 10 machine. 我在Windows 10计算机上使用cx_Oracle和Python 3.7。

I get this error message: "cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded:" 我收到此错误消息:“ cx_Oracle.DatabaseError:DPI-1047:无法加载64位Oracle客户端库:”

You need oracle client 11 or 10. Oracle client 12 can not connect to oracle 9i. 您需要oracle客户端11或10。Oracle客户端12无法连接到oracle 9i。 The oracle client libraries must be either 32-bit or 64-bit, matching your Python architecture. 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>

Recent versions of cx_Oracle require 11.2 or later Oracle client libraries. 最新版本的cx_Oracle需要11.2或更高版本的Oracle客户端库。 Luckily Oracle client 11.2 will connect to Oracle DB 9.2 and later DBs. 幸运的是,Oracle客户端11.2将连接到Oracle DB 9.2和更高版本的DB。 From the error message you need a 64-bit version, which you can get using the free Oracle Instant Client . 从错误消息中,您需要一个64位版本,可以使用免费的Oracle Instant Client获得该版本。

Review the cx_Oracle installation manual section Oracle Client and Oracle Database Interoperability . 查看cx_Oracle安装手册一节“ Oracle客户端和Oracle数据库的互操作性”

If you are new to cx_Oracle, look at the tutorial and samples . 如果您不熟悉cx_Oracle,请查看教程示例 cx_Oracle runs individual SQL statements; cx_Oracle运行单个SQL语句; it does not run SQL*Plus scripts (with multiple statements) 它不运行SQL * Plus脚本(带有多个语句)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM