简体   繁体   中英

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. I am using cx_Oracle and Python 3.7 on Windows 10 machine.

I get this error message: "cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded:"

You need oracle client 11 or 10. Oracle client 12 can not connect to oracle 9i. The oracle client libraries must be either 32-bit or 64-bit, matching your Python architecture.

    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. Luckily Oracle client 11.2 will connect to Oracle DB 9.2 and later DBs. From the error message you need a 64-bit version, which you can get using the free Oracle Instant Client .

Review the cx_Oracle installation manual section Oracle Client and Oracle Database Interoperability .

If you are new to cx_Oracle, look at the tutorial and samples . cx_Oracle runs individual SQL statements; it does not run SQL*Plus scripts (with multiple statements)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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