- 3,724,517 Users
- 2,244,775 Discussions
- 7,851,066 Comments
Forum Stats
Discussions
Categories
- 15 Data
- 362.2K Big Data Appliance
- 6 Data Science
- 2.1K Databases
- 628 General Database Discussions
- 3.7K Java and JavaScript in the Database
- 32 Multilingual Engine
- 497 MySQL Community Space
- 7 NoSQL Database
- 7.7K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 422 SQLcl
- 64 SQL Developer Data Modeler
- 185.1K SQL & PL/SQL
- 21.1K SQL Developer
- 2.5K Development
- 3 Developer Projects
- 32 Programming Languages
- 135.7K Development Tools
- 14 DevOps
- 3K QA/Testing
- 339 Java
- 10 Java Learning Subscription
- 12 Database Connectivity
- 72 Java Community Process
- 2 Java 25
- 12 Java APIs
- 141.2K Java Development Tools
- 9 Java EE (Java Enterprise Edition)
- 153K Java Essentials
- 135 Java 8 Questions
- 86.2K Java Programming
- 270 Java Lambda MOOC
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 16 Java SE
- 13.8K Java Security
- 4 Java User Groups
- 22 JavaScript - Nashorn
- 18 Programs
- 148 LiveLabs
- 34 Workshops
- 10 Software
- 4 Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 4 Deutsche Oracle Community
- 16 Español
- 1.9K Japanese
- 3 Portuguese
How to clean up older records in AUD$ table

Hi Folks,
I am looking for a process to truncate records in AUD$ table
Please Help me how to clean up older records(eg:older than Jan 1 2013) in AUD$ table .
Thanks,
Anand T
Answers
-
Most questions on Oracle have a version dependent answer. When you don't mention your four digit version this increases the chance for an inaccurate answer, or no answer at all.
In 11gR2, Oracle provides a dbms_audit_mgmt package for this purpose.
Please use the online documentation as your first stop to answer your questions.
-----------
Sybrand Bakker
Senior Oracle DBA
-
Hi ,
RDBMS:11gr2
Verion:11.2.0.3.0
Can we truncate records in AUD$ for particular date by using this package dbms_audit_mgmt.
Is there any method to truncate records manully
-
Hi,
You can check this Doc for step by step :ORACLE-BASE - Auditing Enhancements (DBMS_AUDIT_MGMT) in Oracle Database 11g Release 2
HTH
-
If I would be pointed to an Oracle facility I don't know I would consult online documentation first.
If YOU would have done so, you wouldn't have asked this question!
-----------------
Sybrand Bakker
Senior Oracle DBA
-
Hi,
I looked over so many online Docs .I couldn't get the clear idea ,so finally I posted here for soultion.
Thanks for treating in such a way .
Anand T
-
1005886 wrote: Hi, I looked over so many online Docs .I couldn't get the clear idea ,so finally I posted here for soultion. Thanks for treating in such a way . Anand T
We have no idea what is included in "so many online Docs". The specific doc you should be looking at is here: DBMS_AUDIT_MGMT
And specific to your question, DBMS_AUDIT_MGMT
What specific parts of the above are you having difficulty with? We can help, but only if we know the problem
Of course, there is the older method that should be self-evident.
Your question was "how to clean up older records(eg:older than Jan 1 2013) in AUD$ table"
I assume "clean up" means"delete". So the question is "how to delete records older than a given date from the AUD$ any table?"
Would it not be
delete from a_table
where a_date_column < to_date('2013-01-01','yyyy-mm-dd');
-
You can use the following statement to delete the records in AUD$ < jan 1 2013.
DELETE FROM SYS.AUD$ WHERE NTIMESTAMP# < to_date('01-JAN-2013 00:00:00','DD-MON-YYYY HH24:MI:SS');
You can also schedule jobs to purge the AUD$.
-
If you are more concerned, aud$ can be moved to other tablespace
How To Move The DB Audit Trails To A New Tablespace Using DBMS_AUDIT_MGMT?
[Article ID 1328239.1]
it is safe to do.
Pradeep