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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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
0

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
listener.ora_.txt
sqlnet.ora_.txt
tnsnames.ora_.txt
0
Geert GOracle dbaCommented:
the only database entry which is in there is
ORA1

open a cmd and enter this command:

cmd
tnsping ora1

Open in new window


does the tnsping give you the same location as where your files came from ?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Geert GOracle dbaCommented:
i would change the "localhost" in your tnsnames.ora and listener.ora to your actual computer name
0
Mohammed DallagPetroleum ConsultantAuthor Commented:
yes and please check the attachement
2018-01-09_16-57-56.jpg
0
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:
https://support.microsoft.com/en-us/help/942976/odbc-administrator-tool-displays-both-the-32-bit-and-the-64-bit-user-d

This is the Bit version of the application needing the ODBC drivers not the OS.
0
Mohammed DallagPetroleum ConsultantAuthor Commented:
I installed Oracle 12 client 32 bit and Oracle database 12.2 64 bit.
0
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.
0
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
ODBC

From novice to tech pro — start learning today.