Page 1 of 1

ORA-00018 - maximum number of sessions exceeded

Posted: Sun 13 Aug 2006 16:54
by Mentor
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

Posted: Tue 15 Aug 2006 14:02
by Paul
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