0

Need to use cx_oracle module with python 3.x version to connect Oracle 19c with TLS. There are firewalls and proxies.

How to implement it? Do I have to use Oracle Wallets? Is TLS 1.2 good enough or I need TLS 1.3 in 2022?

import cx_Oracle
conn = cx_Oracle.connect("uname/pwd@//localhost:1521/sd")
cur = conn.cursor()
cur.execute("SELECT 'Hello' FROM dual")
res = cur.fetchall()
  • See [this similar question](https://stackoverflow.com/questions/66094119/python-connect-to-oracle-database-with-tcps). Yes, you usually need a Wallet, and the server usually determines which TLS version you need. – kfinity Apr 11 '22 at 19:17

1 Answers1

0

If this is a cloud DB you no longer always need a wallet. With recent Oracle Client libraries you can use 1-way TLS. See Easy wallet-less connections to Oracle Autonomous Databases in Python.

Christopher Jones
  • 9,449
  • 3
  • 24
  • 48