RE: SOS! ORA-03114: not connected to ORACLE && MS's Bug??

From: Jackson Davis [MS] ([MS)
Date: 06/18/04


Date: Fri, 18 Jun 2004 08:51:02 -0700

Install the QFE refered to in the post. It is available at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;830173

Hopefully that will help

Jackson Davis

--
This post is provided "as is" with no warrentee and implies no rights.
"ʹÃûÑï" wrote:
> ORA-03114: not connected to ORACLE &&  MS's Bug??
> 
> DataBase:Oracle 817
> using OracleClient,net framework 1.1
> 
> I'm using ADO.Net in C# with Oracle 817.
> 
> and following is my public data access class.
> 
> using System.Data.OracleClient;
> public class ComFun
>  {
>   static public IDataReader ComFun_ExeReader(string Sql)
>   {
>    OracleConnection Conn=new
> OracleConnection(ConfigurationSettings.AppSettings["OracleConnectionString"]
> );
>    OracleCommand Cmd=new OracleCommand();
>    Cmd.CommandText=Sql;
>    Cmd.Connection=Conn;
>    Conn.Open();
>    OracleDataReader
> Reader=Cmd.ExecuteReader(CommandBehavior.CloseConnection);
>    return Reader;
>   }
> 
>   static public DataSet ComFun_ExeDataset(string Sql)
>   {
>    OracleConnection Conn=new
> OracleConnection(ConfigurationSettings.AppSettings["OracleConnectionString"]
> );
>    OracleDataAdapter Ad=new OracleDataAdapter(Sql,Conn);
>    DataSet ds=new DataSet();
>    Conn.Open();
>    Ad.Fill(ds);
>    Conn.Close();
>    return ds;
>   }
> 
>   static public Object ComFun_ExeScalar(string Sql)
>   {
>    OracleConnection Conn=new
> OracleConnection(ConfigurationSettings.AppSettings["OracleConnectionString"]
> );
>    OracleCommand Cmd=new OracleCommand();
>    Cmd.CommandText=Sql;
>    Cmd.Connection=Conn;
>    Conn.Open();
>    Object  Obj=Cmd.ExecuteScalar();
>    Conn.Close();
>    return  Obj;
>   }
> }
> 
> 
> in other .cs files i always coding like this
> 
>  string sql="select person_name,person_age from person";
>  IDataReader Reader=ComFun.ComFun_ExeReader(sql);
>  DropList.DataSource=Reader;
>  DropList.DataText.....="person_name";
>  DropList.DataBind();
>  Reader.Close();Reader.Dispose();
> 
> 
> but sometimes returning the following exception "ORA-03114: not connected to
> ORACLE". sometimes not.
> 
> Why?????
> 
> I find a article
> 
> http://www.dotnet247.com/247reference/msgs/49/248580.aspx
> 
> And find this one !!!!!!!!!!!!!!
> "
> Michael Bachar
> Hi,
> 
> I'm using ADO.Net in C# with Oracle9i Release 9.2.0.4.0
> when loosing the connection with the Oracle database server the connections
> doesn't recover and always returning the following exception even when the
> connection has been restore:
> "ORA-03114: not connected to ORACLE". I'm closing the connection properly in
> that it will return to the connection pool. Here is an example code:
> 
> using(OracleConnection conn = new OracleConnection(connectionString))
> {
> conn.Open();
> using(OracleCommand cmd = new OracleCommand(sql, conn))
> {
> object obj = cmd.ExecuteScalar();
> }
> }
> 
> This should close the connection properly. In the MSDN it is mention that if
> the connection pooler detect that the connection with the server has been
> severed it will remove the connection from the connection pool. It appears
> that this is not happening an I always get bad connections from the pool,
> even after the connection with the database server has been restore. How can
> I solve this? What is the proper way to recover from connection lost with
> database server?
> 
> Thanks,
> Michael.
> 
> 
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>     Angel Saenz-Badillos[MS] (VIP)!!!!!!!!!!!
> Michael,
> I am sorry this one is my fault and it is a very bad
> bug.!!!!!!!!!!!!!!!!!!!! The problem here
> is that our pooler fails to understand that a 03114 exception means we
> should not put the connection back in the pool. We have a QFE that fixes
> this problem by discarding the connection in the following Oracle
> exceptions. Please let me know if you know of any other exceptions that also
> result in a connection no longer being valid.
> 
> oracle exceptions checked
> case 18: // max sessions exceeded,
> case 19: // max session licenses exceeded
> case 24: // server is in single process mode
> case 28: // session has been killed
> case 436: // oracle isn't licensed
> case 1012 //not logged on error
> case 1033: // startup/shutdown in progress
> case 1034: // oracle not available
> case 1075: // currently logged on
> case 3113: // end-of-file on communication channel
> case 3114: // not connected to ORACLE
> case 12154: // can't resolve service name
> case 12xxx //any error starting with 12 thousand
> 
> To get the fix please contact PSS directly and request QFE 830173
> "
> 
> 
> ???? Does It's MS's BUG?
> 
> And What should I Do?
> 
> 
> 
> 
> 


Relevant Pages

  • RE: ADO.Net Connection Pooling Problem with Oracle
    ... the CLR is releasing the connection to your database. ... the number of database sessions in Oracle seem to ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connecting to ODBC DB at startup
    ... Creating an Oracle connection in an independent object ... Dim cnConn As ADODB.Connection ... Dim strDB As String ...
    (comp.databases.ms-access)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Oracle connection Fails
    ... That should show you what's attempting to be sent to the server. ... to connect to the oracle database by using Oracle data provider ... from Our main server i am getting an exception. ... Connection conn, IntPtr opsErrCtx, Object src) ...
    (microsoft.public.dotnet.framework.adonet)