ORA-24762: server failed due to unspecified error

ORA-24762: server failed due to unspecified error

Postby DavePark » Fri 21 Jan 2011 16:23

I'm using dotConnect for Oracle v6.0.70.0

I'm getting an ORA-24762 on commit after executing a SQL command that is an anonymous PL/SQL block within a TransactionScope.

I re-created the problem in a simple app:

1) Create a Silverlight App
2) Add an ADO.NET Entity Data Model
- just select a dotConnect for Oracle connection
- no entities added to model
3) Add a Domain Service Class
- include RIA Services
4) Add a reference to System.ServiceModel.DomainServices.EntityFramework
5) Edit the Domain Service Class:

Code: Select all

namespace TestORA24762.Web
   using System.Data;
   using System.Data.Common;
   using System.Data.EntityClient;
   using System.ServiceModel.DomainServices.EntityFramework;
   using System.ServiceModel.DomainServices.Hosting;
   using System.ServiceModel.DomainServices.Server;
   using System.Text;
   using System.Transactions;

   public class DualDomainService : LinqToEntitiesDomainService
      static object obj = null;
      static DualDomainService()
            System.Reflection.Assembly assembly = System.Reflection.Assembly.Load("Devart.Data.Oracle, Version=, Culture=neutral, PublicKeyToken=09af7300eec23701");
            System.Type ttt = assembly.GetType("Devart.Data.Oracle.OracleMonitor");
            obj = System.Activator.CreateInstance(ttt);
            System.Reflection.PropertyInfo property = ttt.GetProperty("IsActive");
            property.SetValue(obj, true, null);
         catch (System.Exception exc) { }

      public int PokeDual(string y)
         using (TransactionScope tran = new TransactionScope())
            StringBuilder sqlbuf = new StringBuilder();
            sqlbuf.Append("declare x varchar2(1); begin select dummy into x from dual where dummy = :y; end;");
            DbConnection conn = (DbConnection)((EntityConnection)this.ObjectContext.Connection).StoreConnection;
            if (conn.State != ConnectionState.Open)
            int result = 0;
            using (DbCommand cmd = conn.CreateCommand())
               cmd.CommandText = sqlbuf.ToString();
               IDbDataParameter dbp = cmd.CreateParameter();
               dbp.ParameterName = "y";
               dbp.DbType = DbType.String;
               dbp.Value = "x";
               result = cmd.ExecuteNonQuery();
            return result;

6) Add a button in the xaml to call the service method

When I run this against Oracle (see versions below), I get the ORA-24762 error on commit. dbMonitor shows the error as well.

Oracle Versions from v$version:
Oracle Database 11g Release - Production
PL/SQL Release - Production
CORE Production
TNS for 32-bit Windows: Version - Production
NLSRTL Version - Production

Has anyone else seen this?

Any assistance would be much appreciated.


Posts: 4
Joined: Wed 19 Jan 2011 16:23
Location: Malvern, PA

Postby DavePark » Mon 24 Jan 2011 20:37

I found another piece of code that was doing something similar but did not throw the ORA-24762 error. The difference was that the other piece of code was also doing something with the object context that required saving.

My original encounter with this problem was in a delete method where I am cascading the deletes by running a block of SQL (in order to avoid having to load all of the data into memory [too slow] and in order to avoid having to have cascading foreign key constraints [too dangerous]). I had included the deletion of the parent/header row within the block of SQL as opposed to calling the standard ObjectContext..DeleteObject method. Removing this deletion from the block of SQL and calling the standard method eliminated the ORA-24762 error, and calling this method also has the benefit of handling concurrency checking correctly.

Note that the code, as originally written, causes no problems when using the Microsoft drivers and SQL Server, so someone might eventually want to look into this. But it's now working for me so I'm happy. :)
Posts: 4
Joined: Wed 19 Jan 2011 16:23
Location: Malvern, PA

Postby AndreyR » Wed 26 Jan 2011 11:38

Thank you for the inquiry.
I have made some tests using the Oracle server using Oracle Client and upcoming dotConnect for Oracle 6.10.
Your code worked smoothly, and DBMonitor have shown correct queries.
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Return to dotConnect for Oracle