Tech

Guides
 

Capture an Oracle 10g audit trail in XML format

By Bob Watkins, Special to ZDNet Asia
Thursday, January 03, 2008 03:26 PM

Oracle 10g can be configured to write its audit logs to XML files in operating system directories. This tip shows the configuration changes that need to be made, as well as how to access the resulting XML files.

The Oracle database has long had the ability to audit selected types of operations against the database, storing the audit trail in a system table. This table, SYS.AUD$, resides in the data dictionary. On some operating systems, you can also write audit records to the operating system's own event logging subsystem.

Oracle 10g added a third option: The ability to write to files in an operating system directory. These files can be written in XML.

There are several benefits to using XML instead of SYS.AUD$ for auditing, including:

  • XML can easily be processed by tools outside the database, filtered for events of interest, combined with audit logs from other systems, and formatted for HTML display.
  • Operating system files can provide stronger security than the SYS.AUD$ table, especially if it's desirable to protect the audit trail from viewing or modification even by the DBA.
  • Audit logs stored outside the database continue to be available even when the database instance is down, but they can still be queried from within the database via a new view, V$XML_AUDIT_TRAIL.

To activate auditing to XML files, two initialization parameters need to be set. First, identify the directory to which the audit files will be written by setting:

audit_file_dest='directorypath'

Note that this is not a directory object such as the Data Pump utilities use, but the actual pathname of the operating system directory.

Second, set the audit_trail parameter:

audit_trail=xml

Finally, restart the Oracle instance. The audit_trail parameter is static and requires that Oracle be restarted for it to take effect. However, you can change the audit_file_dest parameter dynamically via the ALTER SYSTEM command if the DEFERRED parameter is used:

ALTER SYSTEM SET audit_file_dest='directorypath' DEFERRED

Existing sessions will keep logging to the original location, but new sessions will log to the new destination.

Bob Watkins (OCP, MCDBA, MCSE, MCT) is a computer professional with 25 years of experience as a technical trainer, consultant, and database administrator. Visit Bob's site.



WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.

Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

  • HPC Applications

    Ever wondered if High Performing Computing systems really matter in our day-to-day world? HPC is not just reserved for the some obscure high-end scientific studies.

    David Scott from Intel Corporation gives you a quick tour to the process of developing HPC applications and the interesting world of HPC Applications in today's industries, including the lucrative oil industry.
    Play video


  • Maximize IT Spend: Business Acceleration

    How do you ensure your IT solutions are well integrated and streamlined across your enterprise? Rajendhiran Sanggaran from Oracle explains the processes and important considerations required to enable IT to fuel your business to the next level of growth.
    Play video

Whitepapers / Case Studies

Downloads

Database News


Tech Jobs Now!

Tags

  1. .net
  2. access
  3. active
  4. analysis
  5. availability
  6. data
  7. directory
  8. do
  9. documents
  10. double-take
  11. excel
  12. high
  13. management
  14. microsoft
  15. page
  16. ports
  17. project
  18. secure
  19. server
  20. service
  21. services
  22. should
  23. simply
  24. sql
  25. time
  26. tips
  27. use
  28. using
  29. windows
  30. word