sonnehansen
sonnehansen

Reputation: 130

cx_Oracle with Windows authentication

I would like to make cx_Oracle work with Windows OS authentication but fail miserably:

  1. I know that with pyodbc you can make it work using trusted_connection='yes' but I have to make use of the Oracle client (11g/12c), which does not seem to go well in hand with pyodbc.

  2. The closest to what I need seems to be the use of Wallets. However, duplicating existing information does not seem like the way to go.

  3. There is mention of external authentication in the cx_Oracle 5.2.1 release notes but this also seems related to wallets.

I hope that some clever person out there can point me in the right direction, thanks :)

Upvotes: 2

Views: 3553

Answers (1)

Anthony Tuininga
Anthony Tuininga

Reputation: 7096

For external authentication with cx_Oracle, the code to use is as simple as this:

import cx_Oracle

conn = cx_Oracle.connect(dsn="the_tns_entry_name")

Upvotes: 3

Related Questions