create connection with oracle wallet #233
-
Hello, on cx_Oracle I was able to use these os.environ['TNS_ADMIN'] = 'sqlnet.ora and tnsnames.ora location'
connection = cx_Oracle.connect(dsn='DSN NAME') but on oracledb it gave me error os.environ['TNS_ADMIN'] = 'sqlnet.ora and tnsnames.ora location'
connection = oracledb.connect(dsn='DSN NAME')
|
Beta Was this translation helpful? Give feedback.
Answered by
anthony-tuininga
Sep 26, 2023
Replies: 1 comment 2 replies
-
Thin mode (the default) does not support external authentication which is what you are showing here. You need to add this line before calling oracledb.init_oracle_client() This enables thick mode which is what cx_Oracle used. At that point your program should work the same way it did before! |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
cjbj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thin mode (the default) does not support external authentication which is what you are showing here. You need to add this line before calling
oracledb.connect(dsn="DSN NAME")
:This enables thick mode which is what cx_Oracle used. At that point your program should work the same way it did before!