advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
Tip of the Day
Average Rating: 4.3/5 | Rate this item | 4 users have rated this item.
Expertise: Advanced
Language: SQL
June 16, 2009
How to Store Oracle 10g Log Files in XML

Logging is a top priority for any project. Current versions of most popular databases have excellent logging capabilities, but it's not always easy to get the logged data in a format that you can work with.

Oracle 10g gives you the capability to store logs in three ways:

  1. Store operational logs in the System Table, which you can find in the Data Dictionary. The table is called SYS.AUD$.
  2. Write operational logs to the system's Logging System.
  3. Write operational logs to flat files in the system directories, as many conventional logging mechanisms do.

Each method has both advantages and disadvantages. This tip concentrates on the third option, saving log information to flat files, in XML format.

XML is the chosen standard here because it's easy for external systems to interoperate with, it requires no dependence on the live database, and Oracle includes support for querying XML-formatted log files.

Follow these steps to enable the XML-formatted flat-file logging option in an Oracle 10g installation:

  1. Set the log file directory by setting the audit_file_dest parameter. Note that the path must be a valid OS directory.
  2. audit_file_dest='loggingpath'
  3. Set the Audit_Trial parameter to XML:
  4. audit_trail=xml

You need to restart the Oracle instance for logging to take effect.

Srinath MS
If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible. Submit your tip here.
Please rate this item (5=best)
 1  2  3  4  5
advertisement
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs