Open maxfratini opened 2 years ago
Hi,
Preql doesn't officially support Oracle yet, and you'll encounter all kinds of errors if you try to use it.
But thanks for letting me know! So basically, this should solve it?
dsn = host if database is None else "%s/%s" % (host, database)
Hi,
I do not believe checking against None
would work, because database
is set to ""
.
I've fixed this way and it works:
if database == "":
self.args = dict(dsn="%s" % (host), user=user, password=password)
else:
self.args = dict(dsn="%s/%s" % (host, database), user=user, password=password)
I understand. Thanks again.
Hi,
when a connection uri specify just the TNSNAMES.ORA entry name (e.g. oracle://user>:<passwd>@<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:In fact, using the TNSNAMES entry only, the, while the
host
variable containsdatabase
variable is empty, hence the resultingdsn
is corrupted with a trailing "/" that generates the error when the instant client searches the reference in TNSNAMES.ORA