Archive for the 'Databases' Category

DB2 log analysis

Wednesday, October 27th, 2004

A cool perl one-liners from Diego:

perl -ne ‘$name = $1 if /application name=(.);/; /text=(.(SELECT|INSERT|UPDATE|DELETE).*$)/i && print “$name => $1\n”;’ db2audit.txt | less

perl -ne ‘/text=(.(SELECT|INSERT|UPDATE|DELETE).$)/i && print “$1\n”‘ db2audit.txt