06-25-15, 15:48 #1Registered User
- Join Date
- Jun 2015
Unanswered: How to rollforward to the very very most recent transaction?
I perform online backup with "include logs" every 3 days, have logarchmeth1 = disk:/nfs-server/archive-dir and also rsync my instance directory to the same nfs server every 4 hours.
Most recent file in archive-dir is at 14:26 (7 hours ago), and rollforward works fine, but I don't want to lose those 7 hours in case of disk failure.
Is it possible to archive logs more frequently or maybe it's possible to use "live" logs, because the latest of those downloaded at 20:20. Rollforward with such overflow path fails with a strange permission error
[db2inst1@ec-prod-db-1 ~]$ ls -lt /media/okbackup/rsnapshot/hourly.0/ec-stage-db-1/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000 | head total 146727660 -rw-rw-rw- 1 509 db2iadm1 524296192 Jun 25 20:20 S0001195.LOG -rw-rw-rw- 2 509 db2iadm1 524296192 Jun 25 15:31 S0001206.LOG ... [db2inst1@ec-prod-db-1 ~]$ db2 "rollforward db STAGE_DB to end of logs and stop overflow log path ( /media/okbackup/rsnapshot/hourly.0/ec-stage-db-1/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/ )" SQL2162N A recovery operation failed because the database manager does not have permission to access log file "STAGE_DB" for database "0" on database partition "0" and log stream "". [db2inst1@ec-prod-db-1 ~]$ ls -lt /media/okbackup/rsnapshot/hourly.0/ec-stage-db-1/db2archlogs/db2inst1/STAGE_DB/NODE0000/LOGSTREAM0000/C0000002/ | head total 17664000 -rw-r--r-- 3 509 db2iadm1 261767168 Jun 25 14:26 S0001194.LOG -rw-r--r-- 3 509 db2iadm1 524296192 Jun 25 13:38 S0001193.LOG [db2inst1@ec-prod-db-1 ~]$ db2 "rollforward db STAGE_DB to end of logs and stop overflow log path ( /media/okbackup/rsnapshot/hourly.0/ec-stage-db-1/db2archlogs/db2inst1/STAGE_DB/NODE0000/LOGSTREAM0000 )" Rollforward Status Input database alias = STAGE_DB Number of members have returned status = 1 Member ID = 0 Rollforward status = not pending Next log file to be read = Log files processed = S0001192.LOG - S0001195.LOG Last committed transaction = 2015-06-25-11.26.19.000000 UTC DB20000I The ROLLFORWARD command completed successfully.
06-25-15, 18:23 #2Registered User
Provided Answers: 6
- Join Date
- May 2012
- Canberra, Australia
you can't use active logs for a rollforward. check the archive log command. you can force a log archive periodically if you set up a job in cron. I presume you have the archive log target in a different filesystem to the active logsAndy
"All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you cant get them together again, there must be a reason. By all means, do not use hammer. IBM maintenance manual, 1975 "