Getting ORA-02266 While Truncate Table sys.scheduler$_job_run_details
(Doc ID 2648403.1)
Last updated on APRIL 17, 2023
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 18.9.0.0.0 [Release 11.2 to 18]Information in this document applies to any platform.
Goal
Purge of SYS.SCHEDULER$_JOB_RUN_DETAILS is failing because of foreign key SCHEDULER$_JOB_OUTPUT_FK referencing the PK.
SQL> SELECT SUM(BYTES/1024/1024) FROM DBA_SEGMENTS WHERE SEGMENT_NAME=UPPER('scheduler$_job_run_details');
SUM(BYTES/1024/1024)
--------------------
5964
SQL> truncate table sys.scheduler$_job_run_details;
truncate table sys.scheduler$_job_run_details
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |
References |