I need to compile below query:
delete from dba_audit_trail where TIMESTAMP > SYSDATE - 30;
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityI need to compile below query:
delete from dba_audit_trail where TIMESTAMP > SYSDATE - 30;
You cannot. You need to have SYSDBA privilege on the database.
SYSDBA doest not allow to delete from DBA_AUDIT_TRAIL view but it allows to use DBMS_AUDIT_MGMT which is the right way to purge the audit trail.