Skip to content

DPY-4000 Error: unable to find <TNS> in <path>/tnsnames.ora DUPLICATE #188

Closed Answered by IndexProselyte
IndexProselyte asked this question in Q&A
Discussion options

You must be logged in to vote

After some tinkering i have solved the issue with this code:

import os
import oracledb

params = oracledb.ConnectParams(config_dir=os.getcwd())
params.parse_connect_string("dbsosit_high")
oracledb.init_oracle_client(lib_dir=r'Oracle cloud/instantclient_21_10')
conn = oracledb.connect(user="username", password="admin123", params=params)

The parsing of the connect string solved the DPX-4000 Error.
To then connect and write to my DB i also needed to switch to Thick mode connection.
If you are having a problem with connecting with Thick mode check if you extracted the wallet into the network/admin folder.

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
6 replies
@anthony-tuininga
Comment options

@IndexProselyte
Comment options

@anthony-tuininga
Comment options

@IndexProselyte
Comment options

@anthony-tuininga
Comment options

Comment options

You must be logged in to vote
5 replies
@anthony-tuininga
Comment options

@IndexProselyte
Comment options

@anthony-tuininga
Comment options

@IndexProselyte
Comment options

@cjbj
Comment options

Answer selected by IndexProselyte
Comment options

You must be logged in to vote
1 reply
@anthony-tuininga
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants