I know, I know, you will tell me to check my paths and registry. Believe me.
In my situation - we have two boxes with identical code with identical web.config files. Below are the specifications of both.
- IIS 7.0 configured to reset application pool at midnight
- Oracle.ManagedDataAccess.dll, v 4.121.1.0
- .NET 4.0 ASP.NET Website
Corresponding configuration section:
<oracle.manageddataaccess.client> <version number="*"> <settings> <setting name="TraceFileName" value="C:\MDM\TraceLog\"/> <setting name="TraceLevel" value="7"/> <setting name="SelfTuning" value="0"/> <setting name="TNS_ADMIN" value="C:\MDM\tnsnames"/> </settings> </version> </oracle.manageddataaccess.client>
Our problems began when we switched from unmanaged Oracle to managed.
SYMPTOMS: On the main page of our website there is an automatic update function, so every 2 minutes it reloads the page. Some of our users leave it open when they leave at the end of the day. At midnight, the application pool is recycled. At about 12:02, because the release of Oracle.ManagedDataAccess.dll that we received was not able to resolve the connection identifier errors that persist during any call to the database until the application pool is processed, and at this point everything works smoothly .
Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-12154: TNS:could not resolve the connect identifier specified ---> OracleInternal.Network.NetworkException (0x00002F7A): ORA-12154: TNS:could not resolve the connect identifier specified at OracleInternal.Network.AddressResolution..ctor(String TNSAlias, String instanceName) at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor) at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, String instanceName) at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, String instanceName) at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch) at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch) at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword) at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
TNSPING can easily connect to databases. I left the pages that fell into both of our drawers, which were opened just yesterday, and only one of them showed this problem. The tnsnames.ora file is located in the c: \ mdm \ tnsnames directory on both machines. The tnsnames.ora file is the most recent file of our database team.
The most annoying part of this is that connections work fine when the application pool is reset. No problems, no performance impact, and it didn't appear in our lower environment at all. I cannot provide a trace log, because no matter what I do with the trace settings, nothing appears in the c: \ mdm \ tracelog directory.
Anyone have any ideas as to why this is happening?
edits: No TNS_ADMIN environment variable; the registry variable points to the same location as the configuration file.
All users have full permission to the tnsnames.ora file.
There are only two tnsnames.ora files, mine and the sample included in the previous installation. There are three sqlnet.ora files, one in the same directory as the tnsnames.ora file, one in the% ORACLEHOME% \ network \ admin folder and one in the% ORACLEHOME% \ network \ admin \ sample folder.