How to check if a backup was executed in a specific day
using sysibmadm.db_history view
Example below check ia backup was executed on last Sunday:
db2 "with v1 (dtbkp,start_time) as (select substr(start_time,1,4) || '-' || substr(start_time,5,2) || '-' ||
substr(start_time,7,2),start_time from sysibmadm.db_history where operation='B' and
location='adsm/libtsm.a' and sqlcode is null ) select 'OK' from v1
where dayofweek(dtbkp) = 1 and date(dtbkp) < current date - 7 days"
NOTE: Set the parameter NUM_DB_BACKUPS to 366, else the results abvw just be useful to the last previous12 days