Causes of the ORA-08103 Error: Object No Longer Exists When Working with Partitioned Tables
Problem Scenario: The ORA-08103 error occurs during asynchronous operation of multiple processes. Each process works with a single table partitioned by a composite key. Both DDL operations (e.g., creating or truncating partitions) and DML operations (queries, batch inserts) are used. Each process operates only within its own range of partitions, and queries are restricted to reading data from these specific partitions. The error occurs only when multiple processes run in parallel.
Here are the situations that lead to the ORA-08103 error:
Scenario 1: A query is executed in Session 1 on a non-partitioned table while a TRUNCATE TABLE operation is performed in Session 2.
Cause: The TRUNCATE operation updates the segment address associated with the table (SYS.DBA_OBJECTS.DATA_OBJECT_ID).
Solution: Review and revise the algorithm to avoid conflicts between the query and the TRUNCATE operation.
Scenario 2: While a query is running in Session 1, a SPLIT PARTITION operation is performed in Session 2.
Cause: When splitting the DEFAULT partition into two, the data segment address of the DEFAULT partition is updated.
Solution: Use ADD PARTITION instead of SPLIT PARTITION. Adding a partition does not modify existing partitions, avoiding the issue.
Scenario 3: While a query is running in Session 1 and selecting data from Partition A, a TRUNCATE PARTITION A operation is performed in Session 2.
Cause: The same as in the previous cases — the segment address of the truncated partition is updated, causing the query to fail because the object it references no longer exists.
Solution: Review and revise the algorithm to prevent conflicts.
Detail: Even if the query execution plan includes PARTITION LIST ALL, the error will not occur if the query does not select data from the truncated partition (e.g., when using a condition like WHERE id = p_id OR p_id IS NULL).