Skip to content

Add support for IFILE in tnsnames.ora #311

Closed
@mac-vtl

Description

@mac-vtl
  1. What versions are you using?
SQL> SELECT BANNER FROM v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
import oracledb
print("oracledb.__version__:", oracledb.__version__)

oracledb.__version__: 2.1.0
>>> import sys
>>> import platform
>>> print("platform.platform:", platform.platform())
platform.platform: Linux-5.10.0-22-amd64-x86_64-with-glibc2.31
>>> print("sys.maxsize > 2**32:", sys.maxsize > 2**32)
sys.maxsize > 2**32: True
>>> print("platform.python_version:", platform.python_version())
platform.python_version: 3.11.8
  1. Is it an error or a hang or a crash?

a crash

  1. What error(s) or behavior you are seeing?
DatabaseError: (oracledb.exceptions.DatabaseError) DPY-4000: unable to find "XXXX.WORLD" in /opt/oracle/instantclient_19_16/network/admin/tnsnames.ora
  1. Does your application call init_oracle_client()?

No, running Thin mode

  1. Include a runnable Python script that shows the problem.
import oracledb

with oracledb.connect(user="myuser", password="secretpassword", dsn="XXXX.WORLD") as connection:
    with connection.cursor() as cursor:
        sql = """select sysdate from dual"""
        for r in cursor.execute(sql):
            print(r)
  • crashes if the tnsnames.ora file contains FILE=
  • works if all definitions are included directly in tnsnames.ora file

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