Skip to content

OracleInterface not working with TNSNAMES  #51

Open
@maxfratini

Description

@maxfratini

Hi,

when a connection uri specify just the TNSNAMES.ORA entry name (e.g. oracle://:@<tnsadmin_entry>), PREQL generates the root error:
cx_Oracle.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified

The problem is due to OracleInterface class that creates a wrong dns in the code at line 225:

...
self.args = dict(dsn="%s/%s" % (host, database), user=user, password=password)
...

In fact, using the TNSNAMES entry only, the host variable contains <tnsadmin_entry>, while the database variable is empty, hence the resulting dsn is corrupted with a trailing "/" that generates the error when the instant client searches the reference in TNSNAMES.ORA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions