'How to access OCI ADW without wallet from OCI Datascience notebook(Python)

I have created Autonomous Data Warehouse in OCI and trying to access it from OCI Data science notebooks by following this docs Connect Python without a Wallet

I have also installed Oracle Instant Client 19.6 and added symlink as mentioned in above doc but the script is looking for wallet file and throws error: ORA-28759: failure to open file

Code:

import cx_Oracle as cx
import sys

dsn = """(description= (retry_count=15)(retry_delay=3)(address=(protocol=tcps)
<my-connection-string> C=US")))"""

try:
    con = cx.connect(user="<my-user>", password="<my-password>", dsn=dsn, encoding="UTF-8")
    print("Database version:", con.version)
except Exception as err:
    print(err)
    sys.exit(1)

Yes, I've checked other related questions but no luck! Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source