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?
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?
The db2audit file grows very large.
Solution for problem #1:
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.
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
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:
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.