Pruning a DB2 database’s transaction logs

1/ Connect to the database using the command

su – db2inst1

db2 connect to warehouse

2/ Get all log parameters execute the command

db2 get db config | grep -i log

3/ Parameters to look out for from the result of this command are

  •   First active log file – this gives you the active log file. E.g.: S0000123.LOG

4/ Once you know the active log file execute

db2 prune logfile prior to <activeLogFileName>

Views: 4670