Search code examples
db2ibm-midrangedb2-400transaction-log

Is there a way to automate the deletion of db2 transaction log files and archive log files when storage filled up to a given level?


I do manually the deletion of db2 transaction log files and archive log files when storage filled up to a given level? But I need to automate this. Is there a way or script to automate this?


Solution

  • Use a scheduled script to eliminate unnecessary log files of DB2, for example:

    find /data/db2/backup/logs/db2inst1/SAMPLE/NODE0000/LOGSTREAM0000/C0000001/*.LOG -mtime +3 -exec rm {} \;