ORA-24388 problem *Sometimes* - please advice
Date: Wed, 25 Feb 2004 09:57:21 +0100
Message-ID: <403c646e$0$570$e4fe514c_at_news.xs4all.nl>
at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor, ArrayList& refCursorParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, ArrayList& refCursorParameterOrdinals)
at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OracleClient.OracleCommand.ExecuteReader()
at
System.Data.OracleClient.OracleCommand.System.Data.IDbCommand.ExecuteReader(
)
at AnalyzeIT.Web.PortalFramework.Data.SysteemDB.GetDatabaseVersie()
- End of inner exception stack trace --- at AnalyzeIT.Web.PortalFramework.Data.SysteemDB.GetDatabaseVersie() at AnalyzeIT.Web.PortalFramework.Common.DefaultPage.CheckDatabaseCompatibilitei t() at AnalyzeIT.Web.PortalFramework.Common.DefaultPage.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte p.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The only statement executed by our code is calling
SysteemDB.GetDatabaseVersie (in the namespace
AnalyzeIT.Web.PortalFramework.Data)
The code for it is:
CREATE OR REPLACE PACKAGE PkgSystem AS
TYPE CRSR IS REF CURSOR;
PROCEDURE GetDatabaseVersie(ERROR OUT NUMBER,CUR OUT CRSR);
END PkgSystem;
/
CREATE OR REPLACE PACKAGE BODY PkgSystem AS
PROCEDURE GetDatabaseVersie(ERROR OUT NUMBER,CUR OUT CRSR) IS
BEGIN
ERROR := 0;
OPEN CUR FOR
SELECT SI_Waarde as DatabaseVersie
FROM Systeeminformatie
WHERE SI_NAAM='DATABASEVERSIE';
EXCEPTION
WHEN OTHERS THEN
ERROR := SQLCODE;
END GetDatabaseVersie;
END PkgSystem;
/
This will execute a stored procedure in the package PGKSystem which has the following implementation:
public string GetDatabaseVersie()
{
cm = DatabaseFactory.CreateCommand();
cm.CommandType = CommandType.StoredProcedure; cm.Connection = this.InternalConnection; cm.CommandText = "PkgPortaalBeheer.GetDatabaseVersie";
OracleParameter pa = new OracleParameter();
pa.OracleType = OracleType.Cursor; pa.ParameterName = "CUR"; pa.Direction = ParameterDirection.Output; cm.Parameters.Add(pa);
IDbDataParameter param = new OracleParameter();
param.ParameterName = "ERROR"; param.DbType = DbType.Decimal; param.Direction = ParameterDirection.Output;cm.Parameters.Add(param);
string DatabaseVersion = "";
try
{
this.Connection.Open();
IDataReader dr = cm.ExecuteReader();
// Get the database version
while(dr.Read())
{
try
{
DatabaseVersion = dr["DatabaseVersion"] as string;
}
catch(Exception exc)
{
throw new PortalDataException("PF DB: Failed to get DB version",exc);
}
}
}
catch(Exception exc)
{
throw new PortalDataException("PF DB: Failed to get DB version",exc);
}
finally
{
this.Connection.Close();
}
return DatabaseVersion;
}
Any advice is highly appreciated!
J. Bijleveld
The Netherlands
Received on Wed Feb 25 2004 - 09:57:21 CET