473,507 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.CloseConn ection);
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/247referenc...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?


Nov 16 '05 #1
0 5760

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
2616
sos
by: Goofy | last post by:
Hi all, i am trying to write php scripts using notepad but everytime i opened it, it automatically disappears after a few seconds. it is really frustruating. i cant write code. what can i do?
2
2065
by: Jon | last post by:
I am trying to create a 3 column template by adding a third column to my existing 2 colum one. Here'swthat I have div#mainClm{float:right;width:60%;margin:0px 10% 10% 0px;padding:0px 1% 0px...
16
2326
by: cody | last post by:
Shouldn't if (this!=null) generate a compiler warning? in fact, it does not.
1
3225
by: Dhungu Dhumbak | last post by:
Dear All, SOS Please Help. I have a MS-SQL DB with 4 .ndf files. One (first) .ndf file is missing. somehow got deleted??. Is there any way can rebuild my DB. The .MDF and .LDF files are in...
31
7034
by: stéphane bard | last post by:
hello, my boss ask me to prefer windev to python. I have to argue - python work on multiple platform (linux, mac, windows) A good point but it didn't interest him. Because we want to choose a...
10
2222
by: B. Williams | last post by:
I have an assignment that requires me to write a program that uses a class, a constructor, a switch, and store the records in a text file. The second requirement is to create a function called...
161
7699
by: Peter Olcott | last post by:
According to Troelsen in "C# and the .NET Platform" "Boxing can be formally defined as the process of explicitly converting a value type into a corresponding reference type." I think that my...
1
1853
by: Frank Rizzo | last post by:
I have an application (windows service) that in the beginning reads data rapidly into a collection of large object trees. Each object tree in the collection is about 100mb and typically there are...
9
4171
by: deerchao | last post by:
I'm developing a WinForms application. It slowly eats up memory, one client reported that it took 200MB or more, and finnaly crashed. I myself noticed it's common to use up 30MB memory, but if I...
6
1609
by: WT | last post by:
Hello, Using url rewritting and ajax.net, I tried to circumvent some potential problems with postback url using a code from a sample given by Scott. The idea is to use a control Adapter on...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.