How do I modify the location of the db2audit file output?

Technote (FAQ)


Question


Problem #1:
The db2audit.log file gets very large and fills the file system. Is there any workaround which allows me to store the file in a different location?

Problem #2:
When using the db2audit command with the 'extract delasc' option, the resulting output is written to the instance owner's home directory. Given the large amount of information contained in the output audit file, the instance owner's home directory fills up. Is there any workaround which allows me to store the file in a different location?

Cause

The db2audit file grows very large.

Answer


Solution for problem #1:

Windows:

    for a DB2 V8 instance, use the fsutil windows command to create a hardlink between the log file on the new larger file system to the instances security directory.
      Example:
      1. create log file in new directory
      copy NUL D:\db2audit\db2audit.log
      2. change to the security directory for the instance
      cd C:\Program Files\IBM\SQLLIB\ instance\security\
      3. create windows hardlink to new location
      fsutil hardlink create db2audit.log d:\db2audit\db2audit.log

Unix:


    You can create a symbolic link from db2audit.log in the security directory to a db2audit.log file in another directory or filesystem. By doing so, this will allow the security directory to reside on a large filesystem outside of the instance owner's home directory.

Solution for problem #2:
Workarounds are:
1. Extract each category one at a time, and then move the output file in another file system.
2. Perfrom an audit extract more frequently so that the output file is much smaller. Then copy the audit output file to another file system.


Rate this page:

(0 users)Average rating

Document information


More support for:

DB2 for Linux, UNIX and Windows
Monitor - DB2 Governor

Software version:

7, 8

Operating system(s):

AIX

Software edition:

Enterprise Server

Reference #:

1145643

Modified date:

2010-02-03

Translate my page

Machine Translation

Content navigation