DB2 log analysis

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

Leave a Reply