Skip to content

cx_Oracle, Windows 10 - Unable to acquire Oracle environment handle #144

@damjankuburovic

Description

@damjankuburovic

For general questions:

I have a very specific issue and I have no more ideas :(

I'm using python embedded (version 2.6.9, 32-bit) in my application, to be able to run python test scripts.

I'm running 15-20 python test scripts and directly from last test script I'm trying to write data in Oracle database which is running on remote server (virtual machine in Linux).

To be able to access to Oracle database, I'm using cx_Oracle python module and Instant client.

I have multiple computers (each with the same Application and embedded python) in the same network, but with different OS.
Computers running on Windows 8.1 Pro 64-bit work correctly.
Computers running on Windows 10 Pro, 64-bit sometimes work correctly and sometimes return error:
"Unable to acquire Oracle environment handle"
First execution after Windows restart usually return error. After a few tries start working correctly. And than occasionally fails.

It looks to me like I need to do some additional steps to configure environment for Windows 10, but couldn't find any working solution until now.

I set the PATH variable pointing to the folder where instant client is stored.
Oracle server version is 11_2_4.
Oracle instant client version: 11_2
cx_Oracle version: 5.0.2
Python version: 2.6.9

Additionally, I tried also combination:
Oracle instant client version: 12_1
cx_Oracle version: 5.0.4
, but without success.

Answer the following questions:

  1. What is your version of Python? Is it 32-bit or 64-bit?
  • 2.6.9
  1. What is your version of cx_Oracle?
  • 5.0.2 (5.0.4, same behavior)
  1. What is your version of the Oracle client (e.g. Instant Client)? How was it
    installed? Where is it installed?
  • Instant client 11_2, 32-bit (tried also Instant client 12_2, 32-bit)

  • Zipped version unpacked on C partition

  1. What is your version of the Oracle Database?
  • 11_2_4
  1. What is your OS and version?
  • Windows 10 Pro
  1. What compiler version did you use? For example, with GCC, run
    gcc --version.

  2. What environment variables did you set? How exactly did you set them?

  • Only PATH variable: C:\Oracle\instantclient_11_2

  • I set it manually in System variables

  1. What exact command caused the problem (e.g. what command did you try to
    install with)? Who were you logged in as?
  • connection = cx_Oracle.connect(DATABASE_USER + "/" + DATABASE_PASSWORD + "@" + DATABASE_HOST + "/" + DATABASE_NAME)
  1. What error(s) you are seeing?
  • "Unable to acquire Oracle environment handle"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions