Python 带有连接字符串的cx_Oracle.SessionPool

Python 带有连接字符串的cx_Oracle.SessionPool,python,oracle,Python,Oracle,如何在Python中仅使用连接字符串连接cx_Oracle.SessionPool?目前,我一直在与: self.mypool = cx_Oracle.SessionPool(user=self.usr, password=self.pwd, dsn=self.dsn, min=1, max=2, increment=1) 由于oracle钱包的更改,我只有连接字符串 我花了两天时间来寻找解决方案 cx_Oracle.SessionPool(dsn='ORCL',min=1,max=20,in

如何在Python中仅使用连接字符串连接cx_Oracle.SessionPool?目前,我一直在与:

self.mypool = cx_Oracle.SessionPool(user=self.usr, password=self.pwd, dsn=self.dsn, min=1, max=2, increment=1)

由于oracle钱包的更改,我只有连接字符串

我花了两天时间来寻找解决方案

cx_Oracle.SessionPool(dsn='ORCL',min=1,max=20,increment=1,threaded=True,externalauth=True,齐性=False,user='',password='')

来自cx\U Oracle文档

增加对外部识别用户的支持;要使用此功能,请将用户名和密码字段留空 连接时

externalauth=True
允许使用oracle钱包

symonic=False
允许在池中使用不同的身份验证

应在tnsnames.ora中设置dsn

e、 g。
ORCL=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xx.xx.xx)(PORT=1521))(CONNECT\u DATA=(SERVICE\u NAME=ORCL)))