Skip to content

cx_Oracle 6.1. Using oracle wallet with SessionPool #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mill9r opened this issue Jan 5, 2018 · 3 comments
Closed

cx_Oracle 6.1. Using oracle wallet with SessionPool #134

mill9r opened this issue Jan 5, 2018 · 3 comments
Labels

Comments

@mill9r
Copy link

mill9r commented Jan 5, 2018

I tried to use oracle wallet in my python script.
con = cx_Oracle.connect(user='',password='',dsn="ORCL")
it works well with oracle db 11g.
tnsnames.ora
ORCL=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host_address)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=orcl)))

For my application i need session pool with oracle wallet:
cx_Oracle.SessionPool(dsn='ORCL', min=1, max=20, increment=1, threaded=True, externalauth=True, user='',password='')
As a result > cx_Oracle.DatabaseError: ORA-01017: invalid username/password; logon denied

I also tried to change tnsnames.ora and add pooled.
ORCL=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.6.92.153)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)(SERVER=POOLED)))
As a result > cx_Oracle.DatabaseError: ORA-24429: External authentication is not supported in this mode.

Is it possible to use SessionPool with oracle wallet?

@anthony-tuininga
Copy link
Member

It should indeed be possible. I'll find out what the correct incantation is and get back to you!

@anthony-tuininga
Copy link
Member

Ok. The only argument you are missing in your session pool creation is the "homogeneous=False" argument. If you add that, it works as expected. I agree that the error message is a little unhelpful, though!

@mill9r
Copy link
Author

mill9r commented Jan 6, 2018

Thank you! It works well
cx_Oracle.SessionPool(dsn='ORCL', min=1, max=20, increment=1, threaded=True, externalauth=True,homogeneous=False,user='',password='')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants