ph033378 发表于 2016-11-12 10:07:19

DB2恢复

  恢复数据库报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
注意这是在线备份数据库造成的错误,离线没有此错误抛出注意文件夹的权限允许日志写入另附上恢复时出现的异常情况:SQL2581NRestore is unable to extract log files or restore a log directory from the backup image to the specified path. Reason code rc.ExplanationAn error occurred while attempting to extract a log file from the backup image. This could be because one of the following reasons:1The backup image does not include logs.2The log target path specified could be full or invalid.3A log file name in the backup image matches a log file which already exists in the log target path.4There was an I/O error while trying to write the file.5The primary log directory on disk contains log files that will be destroyed by restore.6The mirror log directory on disk contains log files that will be destroyed by restore.User response1Check that the backup image contains log files to be restored. If it does not, resubmit the command without specifying the LOGTARGET parameter.2Check that the specified LOGTARGET path is valid and that there is enough space available for all log files in the backup image to be extracted. Resubmit the command.3Check that there are no existing log files in the log target path with the same name as log files in the backup image being restored. Resubmit the command.4See the DB2 diagnostics log for additional information. Try to resolve the problem and resubmit the command.5 or 6You can do one of the following:Manually copy or move the log files from the primary log directory so you can archive those log files; and then call the RESTORE DATABASE command again.Call the RESTORE DATABASE command again with the LOGTARGET parameter and either the INCLUDE FORCE parameter or the EXCLUDE FORCE parameter.
页: [1]
查看完整版本: DB2恢复