ORA-08103: object no longer exists in .net

1.7k views Asked by At

I have a global temporary table (on commit delete rows) called "GLOBAL_T" and a stored procedure which takes a SYS_REFCURSOR as an OUTPUT parameter.

So you can think a stored procedure like this:

PROCEDURE test (POT_CURSOR OUT SYS_REFCURSOR)
IS
BEGIN

--TO FILL THE GTT, CALL ANOTHER PROCEDURE
--BTW, FOLLOWING PROCEDURE HAS NO COMMIT
A_SCHEMA_NAME.A_PACKAGE_NAME.ANOTHER_PROCEDURE();

OPEN POT_CURSOR FOR
SELECT STH FROM GLOBAL_T, BUNCH_OF_OTHER_TABLES B
WHERE B.BLABLA = GLOBAL_T.BLABLA
AND B.BUNCH_OF_OTHER_COLUMNS = T.OTHER_COLUMNS;

END;

The problem is when I call the procedure within a pl/sql block it works fine. But when I call the procedure from .NET it gives me ORA-08103: object no longer exists

The calls are exactly the same. Since the business logic behind the procedures are massive, I tried to simplify them.

2

There are 2 answers

1
Tayfun On BEST ANSWER

The problem is gone after I altered my global temporary table. I made a simple change. Instead of using "on commit delete rows" I used "on commit preserve rows"

2
oratom On

Maybe you have a look at oracle-support and Doc ID 8103.1. Often this exception is raised when other sessions are executing ddl statements against tables or indexes while your sql is running - i.e. truncate table or index rebuilds.

Advice: trace ddl by setting

ALTER SYSTEM SET enable_ddl_logging=TRUE scope=memory

Then run your code hopefully with exception, and later check the diagnostic dir for file ddl_.log. It should contain ddl statements along with a timestamp.

Hope it helps - and don't forget to reset ddl-logging

ALTER SYSTEM SET enable_ddl_logging=FALSE scope=memory