Site icon IT Tutorial

ORA-02002: error while writing to audit trail

I got ” ORA-02002: error while writing to audit trail ”  error in Oracle database.

 

ORA-02002: error while writing to audit trail

 

Details of error are as follows.


ORA-02002:  Error while writing to audit trail

Cause:   The auditing facility is unable to write to the AUDIT_TRAIL table. If this error 
occurs, SQL statements that are currently being audited may also fail. This error will occur
 if the SYSTEM tablespace runs out of disk space


 

 

Error while writing to audit trail

This ORA-02002 errors are related with the auditing facility is unable to write to the AUDIT_TRAIL table. If this error
occurs, SQL statements that are currently being audited may also fail. This error will occur if the SYSTEM tablespace runs out of disk space.

To solve this error, add datafile to SYSAUX tablespace as follows.

SQL> alter tablespace SYSAUX add datafile '+DATA' size 1G autoextend on next 1000M;

 

Or If you don’t use the Audit trail records, then you can purge the SYS.AUD$ table as follows.

SQL> TRUNCATE TABLE SYS.AUD$;

 

Or You can disable the auditing as follows if you don’t want to use Audit trail records.

SQL> ALTER SYSTEM SET AUDIT_TRAIL=NONE SCOPE=SPFILE SID='*';

 

You should restart the database after disabling the audit_trail as follows.

SQL> shutdown immediate
SQL> startup

 

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version