ORA-3113 or ORA-03120 using ODP.NET with RETURN clause (Doc ID 762710.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Data Provider for .NET - Version 10.2.0.1.0 to 11.1.0.7.0
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit)
***Checked for relevance on 22-Jun-2017***

Symptoms

***Checked for relevance on 06-Jul-2010***

An ODP.Net application using the RETURN .. INTO clause with at least one input bind variable in an update statement fails with the following error :

ORA-3113 end-of-file on communication channel

or

ORA-03120: two-task conversion routine: integer overflow error

Example of failing code :

using System;
using Oracle.DataAccess.Types;
using Oracle.DataAccess.Client;
using System.Collections.Generic;
using System.Text;

namespace returninto
{
    class Program
    {
        static void Main(string[] args)
        {
          OracleConnection conn = new OracleConnection(); 
          conn.ConnectionString = "Data Source=ORCL;User ID=SCOTT; Password=\"tiger\""; 

          using (conn) 
          { 
             OracleCommand cmd = new OracleCommand(); 
             cmd.Connection = conn; 
             cmd.CommandText = @"update emp 
                                 set    empno = '7900' 
                                 where  ename=:ename 
                                 return empno 
                                 into   :ret1"; 

             cmd.BindByName=true; 
             cmd.Parameters.Add("ename", OracleDbType.Varchar2); 
             cmd.Parameters["ename"].Value = "JAMES"; 
             cmd.Parameters["ename"].Direction = System.Data.ParameterDirection.Input; 

             cmd.Parameters.Add("ret1", OracleDbType.Decimal); 
             cmd.Parameters["ret1"].Direction = System.Data.ParameterDirection.Output; 

             conn.Open(); 
             try 
               { 
                 cmd.ExecuteNonQuery(); 
               } 
             catch(System.Exception ex)
               {
                System.Console.WriteLine("Failed execute query : {0}.", ex.Message);
            }
            finally
            {
                conn.Close();
            } 

                Console.WriteLine(cmd.Parameters["ret1"].Value.ToString());
                Console.ReadLine();
            } 
     
        }
    }
}


The same  problem occurs using the Microsoft .Net Provider for Oracle (System.Data.OracleClient) as well.

Problem did not occur using 9.2.0.7.0

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms