Home » SQL & PL/SQL » Client Tools » Oracle issue after install ODBC (Oracle 10.2)
Oracle issue after install ODBC [message #441778] Wed, 03 February 2010 01:37 Go to next message
thasan2000
Messages: 4
Registered: February 2010
Junior Member
Hi,
Oracle client is installed in our server under Oracle_ClientHome10g (client1). I wrote a C# application to connect DB and get data. Since my server didnt have ODBC, I installed ODBC10202.. that i got from Oracle web site. It created new client, Oracle_ODBCHOME2 (Client 2)
After the installation, I could connect to db from SQL PLUS. However I couldnt connect from ODBC Data(DNS) Source Admin. I noticed that I had multiple oracle paths, client1 and clinent2, in Envirnment Path. I removed the Client 1 path. Still no luck.
Then I remove the client 2 path and replace the client1 path. Now SQL PLUS and ODBC Datasource(DNS) are working fine.

However my C# application is not working. I am getting the following error.
oracle.DataAccess.Client.OracleException ORA-12154: TNS:could not resolve the connect identifier specified at Oracle.DataAccess.Client.OracleException.HandleErrorHelper

I have the right TNS in the Notwork/Admin folder.

Thank you in advance,
Thasan
How can I fix this without removing the client 1?
Re: Oracle issue after install ODBC [message #441781 is a reply to message #441778] Wed, 03 February 2010 01:41 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How many TNSNAMES.ORA files do you have, now? Every Oracle product you install creates its own, but it becomes a nightmare maintaining them all. Perhaps you could create a TNS_ADMIN environment variable which will point to a single copy of the TNSNAMES.ORA file (which doesn't have to be in ORACLE_HOME\NETWORK\ADMIN directory - put it to a more suitable place, if you wish). For example, this is how I set it:
M:\>set tns_admin
TNS_ADMIN=C:\0_ORACLE_LIBRARY

M:\>

Perhaps it'll help.
Re: Oracle issue after install ODBC [message #441861 is a reply to message #441781] Wed, 03 February 2010 08:58 Go to previous messageGo to next message
thasan2000
Messages: 4
Registered: February 2010
Junior Member
Thank you for your reply.
I will try this.
I have exactly same tnsname file in both clients. How come I still getting same issue?
I read somewhere long time ago that after we install ODBC 32 bit on 64 bit server, we have to modify some registry. I couldnt find that post and not sure how to do it.
something like change C:/Program file (86X)/... to C:/Prog.. or something . I think we have to do something with 86x.
Re: Oracle issue after install ODBC [message #441875 is a reply to message #441778] Wed, 03 February 2010 10:04 Go to previous messageGo to next message
thasan2000
Messages: 4
Registered: February 2010
Junior Member
More info about the Oracle issue:
I wrote a C# application to connect to database and do some stuff. I developed this app in DEV server and I used OracleDataAccess to connect to open oracle connection. I referenced the oracleDataAccess from Oracle/10.2.0/Client_2/ODP.NET/bin/2.x/. When I moved the application to my Test sever. It didn't work.
I got the following error.
--------------------
Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
----------------------
Then I noticed that Test server doen't have BIN folder under the oracle/10.2.0/Client_1/ODP.NET. Test GAC has Oracle.DataAccess 10.2.0.100 version. while DEV GAC has Oracle.DataAccess 1.102.2.20 and Oracle.DataAccess 2.102.2.20(x86). I installed the OracleDataAccess.dll(2x) inTEST GAC from DEV..ODP.NET/bin/2x and also place the file in the application execute folder. Still no luck. I got same error. I removed the file that I just put in TEST GAC and execute folder.

I download ODAC1020221 from oracle web site and installed it in TEST server. It created Client_2 and ODACHome2 in TEST. Now I could see ODP.NET/bin/1x and 2x in the client_2 folder. Oracle.DataAccess 1x and 2x also in the GAC with 10.2.0.100.

AFter this Intallation, SQL PLUS was working fine, however Test Connection wasn't working in ODBC/System DNS. Then I noticed that I had multiple oracle path in ENV path. I removed the Client 1 path. Still it didnt work. Then I replaced the client 1 and removed the client 2 path. Now SQL PLUS and ODBC connection are working fine but my appliction.
I am getting the following error when I run my app:
oracle.DataAccess.Client.OracleException ORA-12154: TNS:could not resolve the connect identifier specified at Oracle.DataAccess.Client.OracleException.HandleErrorHelper

Sorry, I couldnt get the full error message since we have rollback the TEST server this morning.
How can I fix it?
What is the different bettween ODTwithODAC1020221.exe and ODAC1020221.exe?
Do I have to modify any registry after I install ODAC1020221? I read somewhere long time ago that we need to modify the some registry and fix the value from program File (x86) to something if we install 32 bit ODAC on 64 bit server. Couldnt find that post again.
Please help me to fix this issue,
Thank you in advance,
Thasan
Re: Oracle issue after install ODBC [message #442235 is a reply to message #441781] Fri, 05 February 2010 14:31 Go to previous message
thasan2000
Messages: 4
Registered: February 2010
Junior Member
Thank you for LifeFoot,
Oracle 11g fixed the issue.
Previous Topic: Cannot see list of tables in PL/SQL Developer
Next Topic: SQL*PLUS report footer
Goto Forum:
  


Current Time: Sat Dec 03 12:28:23 CST 2016

Total time taken to generate the page: 0.10195 seconds