Ora -12154: TNS:coud not resolve the connect identifier specified Driver's SQLSetConnectAltr failed

I am getting the below error when I try to connect throug ODBC.
Ora -12154: TNS:coud not resolve the connect identifier specified Driver's SQLSetConnectAltr failed
Mohammed DallagPetroleum ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert GOracle dbaCommented:
the location tns_admin is pointing to holds a tnsnames.ora file which doesn't hold your entry for that database
and/or the sqlnet.ora in that same location has settings which don't lead to a resolve

windows searches for tns entries in this order: (that's if tnsnames is specified in sqlnet.ora)
current directory of the exe
tns_admin environment variable
via the first directory containing an oracle client in the path environment variable an
> oracle client's registry setting tns_admin
> if not set, then the client's network/admin directory

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mohammed DallagPetroleum ConsultantAuthor Commented:
Please find attached the listener.ora, sqlnet.ora and tnsnames.ora files
Geert GOracle dbaCommented:
the only database entry which is in there is

open a cmd and enter this command:

tnsping ora1

Open in new window

does the tnsping give you the same location as where your files came from ?
Get Blueprints for Increased Customer Retention

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

Geert GOracle dbaCommented:
i would change the "localhost" in your tnsnames.ora and listener.ora to your actual computer name
Mohammed DallagPetroleum ConsultantAuthor Commented:
yes and please check the attachement
slightwv (䄆 Netminder) Commented:
Do you have more than one Oracle Product installed?  Make sure you are using the correct ODBC drivers.

Did you install the correct Bit version of the ODBC drivers for the app you are using?

Did you run the correct ODBC Admin tool?  There is a 32Bit and 64Bit version:

This is the Bit version of the application needing the ODBC drivers not the OS.
Mohammed DallagPetroleum ConsultantAuthor Commented:
I installed Oracle 12 client 32 bit and Oracle database 12.2 64 bit.
slightwv (䄆 Netminder) Commented:
Then you likely have two different tnsnames.ora files.

If you are using the 32Bit ODBC drivers, you will need to use the tnsnames.ora file under the 32Bit Oracle Home.

There is a way to share a common tnsnames.ora file by setting an environment variable TNS_ADMIN but I find that more confusing for Oracle beginners.

For now, copy the 64Bit tnsnames.ora file into the 32Bit network/admin folder and retry the ODBC connection.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.