DB2 - to prune archive logs

 (1) get the last active log


>db2 get db config | grep -i log

[...]

 First active log file                                   = S0003690.LOG

[...]

$ db2 prune logfile prior to  S0003690.LOG


the above will be decom and use instead

$ db2 prune history 20220521000000     (YYYYMMDDHHMMSS)


Note that 202205 <-- implies from the first of May



[tst3ins3@db2tst602  C0000067]
$ db2 prune history 20251004 AND DELETE
DB20000I  The PRUNE command completed successfully.
[tst3ins3@db2tst602  C0000067]

Comments

Popular posts from this blog

Postgres: Clean up stopped replication slot