ORA-12012: error on auto execute of job “SYS”.”DAILY_OS_AUDIT_PURGE_JOB”

Error:

ORA-12012: error on auto execute of job “SYS”.”DAILY_OS_AUDIT_PURGE_JOB”
ORA-46269: Conflicting operation on audit files
ORA-06512: at “SYS.DBMS_AUDIT_MGMT”, line 177
ORA-06512: at “SYS.DBMS_AUDIT_MGMT”, line 3543

Solution:

Check the audit jobs timing scheduled in Oracle database. you can choose the different timing of the scheduled jobs from rest of jobs:

Check the timing of jobs:

select OWNER,JOB_NAME,to_char(last_start_date,'DD-MM-YY HH24:MI:SS') Last_date_time, to_char(next_run_date,'DD-MM-YY HH24:MI:SS') Next_Date_Time, JOB_ACTION from DBA_SCHEDULER_JOBS;

OWNER JOB_NAME LAST_DATE_TIME NEXT_DATE_TIME JOB_ACTION
----- ---------------------------- ----------------- ----------------- -------------------------------------------------------

SYS DAILY_XML_AUDIT_PURGE_JOB 03-08-21 08:36:49 04-02-21 08:36:49 BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(8, TRUE, 1); END;

SYS DAILY_OS_AUDIT_PURGE_JOB 03-08-21 08:36:49 04-02-21 08:36:49 BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(4, TRUE, 1); END;

SYS DAILY_FGA_AUDIT_PURGE_JOB 03-02-21 08:36:49 04-02-21 08:36:49 BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(2, TRUE, 1); END;

SYS DAILY_STD_AUDIT_PURGE_JOB 03-02-21 08:36:49 04-02-21 08:36:49 BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(1, TRUE, 1); END;

You can change the timing on dbms_Scheduler for the job:


--- Scheduled job with new timing 
BEGIN
  DBMS_SCHEDULER.SET_ATTRIBUTE (
   name         =>  'DAILY_OS_AUDIT_PURGE_JOB',
   attribute    =>  'repeat_interval',
   value        =>  'freq=daily; byhour=2');
END;

DISABLE THE JOB:

you can also disable the job temporary for see error occurred again on next scheduled timing:

begin
dbms_scheduler.disable( '"SYS"."DAILY_OS_AUDIT_PURGE_JOB"' );
END;
/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.