0

I know there are questions about this topic but I really really did everything in document and I am still getting same error. I am really upset about this. I hope you can help me.

I am writing my steps maybe some people came across with this problem or will come across.

windows 10 x64

I downloaded https://www.oracle.com/database/technologies/xe-prior-releases.html Oracle Database 11gR2 Express Edition for Windows x64 after

I downloaded https://www.oracle.com/tools/downloads/sqldev-v192-downloads.html Windows 64-bit with JDK 8 included

after

I downloaded and unzip the https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html

oracle clint Basic package instantclient-basic-windows.x64-19.6.0.0.0dbru.zip after I unzip the file I took the path of the file and added to environment variable.

I installed pip install cx_Oracle and I used this url's.

'oracle+cx_oracle://{username}:{password}@{hostname}:{port}/{database}'

connection = cx_Oracle.connect("system/password@localhost:port/databasename")

oracle://system:password@localhost:1521/databasename

I am using python3, oracle version 11g but still I couldnt figure out why I am getting this error.

(cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: "DLL load failed: Windows Error 126"

My environment variable path D:\oraclexe\app\oracle\product\11.2.0\server\bin D:\instantclient_19_6 there is a OCI.DLL file in this path

newUser
  • 181
  • 1
  • 14
  • Looks like, you have more than one Oracle Client installed. Usually that's a bad idea. Try to clean it up, see https://stackoverflow.com/questions/8450726/how-to-uninstall-completely-remove-oracle-11g-client for help. Then is you python 32-bit or 64-bit? The Oracle Client has to be the same architecture as your python. – Wernfried Domscheit Apr 02 '20 at 11:39
  • python 64-bit but How can I undestand I have more than one oracle client – newUser Apr 02 '20 at 12:08
  • Your PATH points to two different Oracle folders, indicating different versions. Maybe this one helps: https://stackoverflow.com/questions/25216290/installing-oracle-32-bit-client-on-windows-server-already-running-64-bit-oracle/25229914#25229914 – Wernfried Domscheit Apr 02 '20 at 12:22
  • but this one is D:\oraclexe\app\oracle\product\11.2.0\server\bin normal oracle database express edition path and this one D:\instantclient_19_6 is oracle client path – newUser Apr 02 '20 at 13:08
  • I download oracle database express edition and oracle sqldeveloper. After I download oracle client and extract it to a folder than I add it to the environment variable path. That is it right? Should I need to do more? – newUser Apr 02 '20 at 13:12
  • You should not install more than one Oracle Client (i.e. one for each architecture). The Oracle database always include also the client libraries, so in general there is no need to install an additional client. – Wernfried Domscheit Apr 02 '20 at 13:47
  • so just database express and oracle sqldeveloper – newUser Apr 02 '20 at 16:04
  • Yes, however SQL Developer is Java/JDBC based and completely independent. – Wernfried Domscheit Apr 02 '20 at 16:24
  • ok I create a vm and trying to install database express and oracle sql developer and share the result here – newUser Apr 02 '20 at 16:57
  • didnt work damn I installed just these two and still same error. I think everybody can connect to oracle but not me. I dont know what is wrong this. – newUser Apr 02 '20 at 19:20
  • ```import cx_Oracle``` ```con = cx_Oracle.connect('system/password@127.0.0.1/xe')``` ```print(con.version)``` ```con.close()``` – newUser Apr 02 '20 at 19:24
  • You CAN install more than one Oracle Client, and sometimes you NEED to install more than one. But if you do, you MUST be careful about changing PATH. In some case you will need to change PATH in a script and then invoke an application. – Christopher Jones Apr 02 '20 at 21:51
  • 1
    There are two big questions: why are you using XE 11 and not [XE 18](https://www.oracle.com/database/technologies/xe-downloads.html)? And second, why are you installing Instant Client if you already have the DB installed? cx_Oracle can use the libraries from the DB. Read the [installation instructions](https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#installing-cx-oracle-on-windows). – Christopher Jones Apr 02 '20 at 21:53
  • @ChristopherJones there is no specific reason to use XE 11. I installed two things. one is oracle express database 11gr2 and oracle sql developer. I check environment variable OCI.DLL path is right. I have python 3 and 64-bit. but why I am getting still this error. – newUser Apr 03 '20 at 07:30
  • @ChristopherJones what should I install can you write me please? just the names – newUser Apr 03 '20 at 08:38

0 Answers0