1

I've got a console program that does the following using the enterprise library and oracle ODP.NET

  1. Open connection
  2. Search for some data
  3. Close connection
  4. Wait a small period of time
  5. Repeat

After somewhere between 30 minutes and 3 hours (typically it's about 2 hours) I get an oracle 03113 end of file communication.

I've traced it to it getting a connection (well, thinking it has a connection) then it fails on the execution of a statement (i.e. the first time it tries to use the connection).

Typically (i'm in development), step 2 returns no data and always uses the same sql SELECT.

I've fixed it by adding 'Pooling=false' to the DSN:

  <add name="DEV64" connectionString="Data Source=dev3;User Id=XXX;Password=YYY;Pooling=false" providerName="System.Data.OracleClient"/>

Obviously this isn't ideal, but I've no idea why it's doing this?

I have no firewall between me and the database and I tried ORA-03113: end-of-file on communication channel after long inactivity in ASP.Net app which had one solution of:

Validate Connection = True

But that just crashes with the driver not knowing this.

The code to do this, btw, is something like:

Get my context:

            dac = new DataAccessContext(EnterpriseLibraryContainer.Current.GetInstance<Database>(AppSettingsHandler.ConnectionStringName));

open the connection:

Context.DBConnection = new DataAccessConnection(Context.Database.CreateConnection());
Context.DBConnection.Connection.Open();
return Context.DBConnection.Connection;

read the data, typically where it falls over, presumably a stale connection of sorts:

            DataSet ds = context.Database.ExecuteDataSet(CommandType.Text, query);
Community
  • 1
  • 1
Neil Walker
  • 6,400
  • 14
  • 57
  • 86
  • With ORA-3113 errors, you need to look in the alert.log on the database server. Please report the error in the alert.log for that time period. Also please indicate the complete version number of ODP.NET, the complete version of the database, and the complete version of Visual Studio you are using. – Christian Shay Oct 31 '14 at 11:08

0 Answers0