Click here to Skip to main content
14,453,795 members
Rate this:
Please Sign up or sign in to vote.
Hi flocks,

I hosted asp.net application and wcf service(for data access from oracle 11g which is at remote.)
while my wcf service trying to connect oracle database I am getting
Description: ORA-12170: TNS:Connect timeout occurredException Details: Oracle Data Provider for .NET
Source File: at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at CLS.FS.DataAccess.ProductGroupDAO.GetBusinessUnits()
exception.

I tried to connect though SqlPlus but the same error(ORA-12170: TNS:Connect timeout occurred).

I tried to ping the using host name i am getting in my hosting server(win2008R2)
approximate round trip times in milli-seconds: mininum=0,maximum=0,average=0
but i am getting some values in my local mechine(windows 7) which is working fine for getting data from oracle11g database.

Please need help to fix this issu..

Thanks in advance..
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Did you search Google for this error? check this
ORA-12170: TNS: Connect timeout occurred tips[^]
   
Comments
s#@!k 28-Jan-14 4:37am
   
I tried the same but not resolved even i am very new to this environment.did u see the approximate round trip time, I didn't get that all zeros.Is it able to ping the host or not
thatraja 28-Jan-14 4:43am
   
You should compare the sqlnet.ora file on both local & server machines. I think something missing.
s#@!k 28-Jan-14 4:52am
   
Thank you for your quick responses..
I copied the same sqlnet.ora file from local to devserver. Is there any chance restrict particular ip address. As seeing round-trip i think it is not able to connect host.do u has any other analysis.
And connect from IIS(hosted wcf service on IIS) is any other permissions needed?
thatraja 28-Jan-14 5:01am
   
Usually they add an entry(listener) to provide access for some machine(ex. dev machine.) So you forgot to update that entry for the server machine.
The application will work only if you put the app.mahine's ipaddress in .ora file.

If you have doubt, ask your DBA or DB team person. He could solve this quickly.

Sample .ORA file Clickety

And careful with copy-paste. Before doing that, you should take a backup of old ora file.
s#@!k 28-Jan-14 5:19am
   
Thank you so much raja but one more thing i forgot, i checked datasources(ODBC) no driver were installed other than sqlserver.I am using odp.net dll(Oracle.DataAccess.dll) only i think nothing installed at server mechine.
thatraja 28-Jan-14 5:47am
   
So solved?
s#@!k 28-Jan-14 5:52am
   
no yet solved error TNS-12535: TNS:operation timed out.I think TNS setup has to be done by the people who know the things clearly.. right? and it is develpment server some other sites also hosted. if i change something it might effect others..Please advise the same
thatraja 29-Jan-14 4:32am
   
Check this
ORA-12535: TNS: operation timed out tips

And yes, you should discuss these things with your Dev. head & DBA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100