Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12547: TNS:lost contact with Oracle.DataAccess.dll

user8728488Jun 9 2011 — edited Jun 9 2011
Hi All,

Forgive me if I leave anything out here, fairly new to this so not sure what is relevant.

Problem description: I am adding onto an existing C# application that talks to a remote oracle DB. The application has been working for over 2 years and my task is to enhance it by retrieving info from another oracle DB that stores different data.

The existing code is setup to talk to the Oracle DB by using the Oracle.DataAccess.Client.OracleConnection. I create a new instance of OracleConnection and give it a connection string like this (host, SID and user/pass have been masked)

Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=1521)))(CONNECT_DATA=(SID=xxxx)));User Id=xxxx;Password=xxxx;"

Today I created new classes, etc. in my C# solution to be the logic for the new database I am trying to connect to. I literally copied the existing methods that worked and just switched out the connection string and the column names I need to output.

When I run a test, I get (after some time) this exception

Oracle.DataAccess.Client.OracleException ORA-12547: TNS:lost contact at Oracl e.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConne
ction conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String pr
ocedure)

This is on the production server.

When I run the same code from my laptop I am able to connect to this "new" DB and retrieve rows.

I looked at my laptop's setup and I noticed that the version of the Oracle.DataAccess DLL I was using is 4.112.2.0

On the production server, added to the C# solution, we have v 9.2.0.700

On a whim I tried to create a quick test app on the production server that would do a simple connect, grab a record
and return some details.

When I run the app on production with v4.112.2.0 I get this

System.TypeInitializationException: The type initializer for 'Oracle.DataAccess
Client.OracleConnection' threw an exception. ---> Oracle.DataAccess.Client.Orac
eException: The provider is not compatible with the version of Oracle client


I am at a loss on what the issue could be since the DLL version on the server seems to be NEWER than what I have on my laptop

Does anyone know....
1) what could the cause be for the "ORA-12547: TNS:lost contact" exception?

2) why can I connect to this "new" DB with v 4.112.2.0 from my laptop but not from the production
server usign a newer version of the DLL


===things I've noted/tried===

a) It's not a firewall...I can telnet to the remote DB host over port 1521 from the production machine where I am facing the issue

b) when I try to use v 9.2.0.700 on my laptop, that breaks too. I get an exception
Unable to load DLL 'OraOps9.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

c) the verison of the Oracle DB (per select * from V$version) is 10.2.0.3.0 for BOTH the old DB where the app works already
and this "new" DB I am trying to add my hook into.


I've read about this error all day...lots of advice to restart, relink, etc but I am just using the lib in a C# application. I am not
building anything.

==other details==

laptop where is work: XP Pro
production machine: Windows Server 2003 standard edition, SP2


if anyone can share a thought/pointers, I would appreciate it.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2011
Added on Jun 9 2011
1 comment
1,320 views