1

I have three different databases for my different environments (hsprd, hstst,hstrn). hsprd is my production environment with live data.

Every so often, a request comes through to restore production data to hstrn or hstst. I typically run this command (after stopping, then dropping the db):

db2 restore db hsprd taken at 20140331180002 to /dbs into hstrn newlogpath /dbs/log/hstrn without rolling forward;

When running this, I receive this message:

SQL2537N Roll-forward is required following the Restore.

Could someone advise how to fix this?

Thanks.

edit: My backups are here:

(/home/dbtmp/backups)> ll                            
total 22791416
-rwxrwxr-x    1 hsprd    cics     11669123072 Mar 31 18:03 HSPRD.0.hsprd.NODE0000.CATN0000.20140331180002.001

After restoring my database and omitting without rolling forward, I receive this message when trying to query the database:

SQL1117N A connection to or activation of database "HSTRN" cannot be made because of ROLL-FORWARD PENDING. SQLSTATE=57019

When I try to rollforward, with this command, I receive this response:

(/home/dbtmp/backups)> db2 rollforward db hstrn to end of backup and complete;
SQL4970N  Roll-forward recovery on database "HSTRN" cannot reach the specified 
stop point (end-of-log or point-in-time) on database partition(s) "0". 
Roll-forward recovery processing has halted on log file "S0006353.LOG".
4

1 回答 1

1

第一个错误表明您正在恢复在线备份,必须前滚。或者,使用脱机备份映像,然后您可以包含该without rolling forward选项。

第二个错误意味着您需要先发出ROLLFORWARD命令,然后才能使用从在线备份恢复的数据库。

最后,第三个错误意味着该ROLLFORWARD命令无法找到它成功所需的日志。假设日志包含在备份映像中,您需要LOGTARGET在命令上指定选项以将RESTORE它们提取到该NEWLOGPATH位置。

于 2014-04-01T20:05:52.537 回答