DB2恢复

当遇到恢复数据库时出现ROLL-FORWARD错误(SQL57019),可以使用DB2的RESTORE命令结合日志路径进行数据库恢复。首先指定数据库名称和日志源路径,然后执行日志回滚到结束,从而完成恢复过程。
摘要由CSDN通过智能技术生成

恢复数据库报ROLL-FORWARD错误(SQL57019),则执行日志回滚

restore db dbname from 路径 taken at *** logtarget 路径

日志路径即DATABASE DIRECTORY+SQLLOGDIR(通过list database directory on /home/db2inst1获取)

还原后执行 rollforward db dbname to end of logs and stop

注意这是在线备份数据库造成的错误,离线没有此错误抛出 注意文件夹的权限允许日志写入 另附上恢复时出现的异常情况: SQL2581N Restore is unable to extract log files or restore a log directory from the backup image to the specified path. Reason code rc. Explanation An error occurred while attempting to extract a log file from the backup image. This could be because one of the following reasons: 1 The backup image does not include logs. 2 The log target path specified could be full or invalid. 3 A log file name in the backup image matches a log file which already exists in the log target path. 4 There was an I/O error while trying to write the file. 5 The primary log directory on disk contains log files that will be destroyed by restore. 6 The
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值