ORA-00018 - maximum number of sessions exceeded

ORA-00018 - maximum number of sessions exceeded

Postby Mentor » Sun 13 Aug 2006 16:54

Hi,

We have an application that hits the Oracle database quite intensively. It hits the database about 5 times every second. After an hour, we get this message

CoreLab.Oracle.OracleException: ORA-00018: maximum number of sessions exceeded
at CoreLab.Oracle.OracleTransaction.Commit()

My best guess would be that Oracle has run out of sessions but this would mean that we aren't closing every Oracle transaction. We did check our code and we are pretty sure we close our connection after each transaction. I was wondering if CoreLabs is aware of any bugs that doesn't close the database connection.

Thank you
Mentor
 

Postby Paul » Tue 15 Aug 2006 14:02

We cannot reproduce this problem using the next example with Ditect=true/false Pooling=true/false

while (true) {
oracleConnection1.Open();
OracleTransaction t = oracleConnection1.BeginTransaction();
try {
oracleCommand1.ExecuteNonQuery();
}
finally {
t.Commit();
}
oracleConnection1.Close();
}


Please check if session is removed from server when you call OracleConnection.Close with the next statement
select * from SYS.GV_$SESSION
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dotConnect for Oracle