还原后需要前滚 [英] Roll-forward is required following the Restore
问题描述
我有三种不同的数据库( hsprd
, hstst
, hstrn
)。 hsprd
是我的生产环境,带有实时数据。
通常,通过一个请求来恢复生产数据 hstrn
或 hstst
。我通常运行此命令(停止后,然后删除db):
db2 restore db hsprd在20140331180002获取到/ dbs into hstrn newlogpath / dbs / log / hstrn没有向前滚动;
运行时,我收到以下消息:
SQL2537N恢复后需要前滚。
有人可以建议如何解决这个问题?
谢谢。
编辑:我的备份在这里:
(/ home / dbtmp / backups)> ll
total 22791416
-rwxrwxr-x 1 hsprd cics 11669123072 Mar 31 18:03 HSPRD.0.hsprd.NODE0000.CATN0000.20140331180002.001
恢复数据库并省略而不滚动
,尝试查询数据库时收到此消息: p>
SQL1117N由于ROLL-FORWARD PENDING,连接或激活数据库HSTRN不能
。 SQLSTATE = 57019
当我尝试前滚时,使用此命令,我收到此响应:
(/ home / dbtmp / backups)> db2 rollforward db hstrn结束备份和完成;
SQL4970N数据库HSTRN上的前滚恢复无法在数据库分区0上达到指定的
停止点(日志结束或时间点)。
前转恢复处理已在日志文件S0006353.LOG上停止。
第一个错误表明您正在还原在线备份,必须向前滚动。或者,使用脱机备份映像,然后您可以包含而不转发
选项。
第二个错误意味着您需要发出 ROLLFORWARD
命令,然后才能使用从在线备份恢复的数据库。
最后,第三个错误意味着 ROLLFORWARD
命令无法找到成功所需的日志。假设日志包含在备份映像中,您需要在 RESTORE
命令中指定 LOGTARGET
选项提取它们,大概是 NEWLOGPATH
位置。
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".
The first error suggests that you are restoring an online backup, which must be rolled forward. Alternatively, use an offline backup image, then you can include the without rolling forward
option.
The second error means that you need to issue the ROLLFORWARD
command before you can use the database restored from an online backup.
Finally the third error means that the ROLLFORWARD
command is unable to find the logs required for it to succeed. Assuming the logs are included in the backup image, you'll need to specify the LOGTARGET
option on the RESTORE
command to extract them, presumably to the NEWLOGPATH
location.
这篇关于还原后需要前滚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!