具有Windows身份验证的cx_Oracle [英] cx_Oracle with Windows authentication
问题描述
我想使cx_Oracle与Windows OS身份验证一起使用,但失败了:
-
我知道使用pyodbc可以使用
trusted_connection='yes'
使其工作,但是我必须使用Oracle客户端(11g/12c),它似乎与pyodbc配合并不好. p> -
最接近我需要的似乎是使用 cx_Oracle 5.2.1中提到了外部身份验证发行说明,但这似乎也与钱包有关.
我希望外面有一个聪明的人可以向我指出正确的方向,谢谢:)
对于使用cx_Oracle进行外部身份验证,使用的代码非常简单:
import cx_Oracle
conn = cx_Oracle.connect(dsn = "the_tns_entry_name")
I would like to make cx_Oracle work with Windows OS authentication but fail miserably:
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.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.
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 :)
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")
这篇关于具有Windows身份验证的cx_Oracle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!