Replies: 5 comments 5 replies
-
I am working on a Deepnote Terminal window. From there, there is no issue in connecting via the SSH tunnel. This is evidenced by the fact that I am able to successfully connect from the Deepnote Terminal to my Oracle SQL Database and query the data (via the SSH tunnel) in my Oracle Cloud database (this is protected behind a private VPN). The issue is also NOT with the cx_Oracle library. I am successfully able to use the cx_Oracle library when using python in the Deepnote terminal: However, this does not work from within the Deepnote Notebook. This is because the Deepnote notebook does not recognize the environment variable LD_LIBRARY_PATH which is essential and points to the location of libclntsh.so I set LD_LIBRARY_PATH as an environment variable as shown below: I continue to get the error as the Deepnote Notebook is not able to recognize the LD_LIBRARY_PATH environment variable. How do I set LD_LIBRARY_PATH before the process even starts? |
Beta Was this translation helpful? Give feedback.
-
I tried using the oracledb method (thin mode) but I get the DPY-6000: cannot connect to database. Listener refused connection. (Similar to ORA-12660) |
Beta Was this translation helpful? Give feedback.
-
I am using python-oracledb Thin mode and trying to connect to a database where the sqlnet.ora file is as under: SQLNET.ENCRYPTION_SERVER=REQUIRED I found a reference to the DPY-6000 at https://github.com/oracle/python-oracledb/blob/main/doc/src/user_guide/appendix_b.rst What line of the sqlnet.ora file do I need to change? Would there be any other security impacts? |
Beta Was this translation helpful? Give feedback.
-
I made the updates to the sqlnet.ora file (on the Oracle database server) as under: ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/opt/oracle/dcs/commonstore/wallets/tde/$ORACLE_UNQNAME))) #SQLNET.ENCRYPTION_SERVER=REQUIRED Now I get a different erorr: DPY-6005: cannot connect to database. Connection failed with "[Errno 99] Cannot assign requested address" |
Beta Was this translation helpful? Give feedback.
-
The SSH tunnel was not up. Once I re-started the tunnel, it worked fine. Thank you Anthony and Chris for your prompt inputs. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to connect from a Deepnote notebook using:
! python -m pip install oracledb --upgrade
import oracledb
import os
with oracledb.connect(user="uname", password="pwd", dsn="localhost/servicename") as connection:
with connection.cursor() as cursor:
sql = """select sysdate from dual"""
for r in cursor.execute(sql):
print(r)
OperationalError: DPY-6000: cannot connect to database. Listener refused connection. (Similar to ORA-12660)
Beta Was this translation helpful? Give feedback.
All reactions