ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 日志文件被删除的恢复sql4970n

日志文件被删除的恢复sql4970n

原创 Linux操作系统 作者:donggua0713 时间:2010-04-25 22:24:19 0 删除 编辑
1.有一个包括日志的备份。
2.将该备份里面的日志恢复出来。
db2 restore db zhouhuan logs from /opt/db2backup/ taken at 20100424162148 logtarget /opt/db2backup/
3.查询该备份文件
[db2inst1@oracle db2backup]$ db2ckbkp -h ZHOUHUAN.0.db2inst1.NODE0000.CATN0000.20100424162148.001


=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- ZHOUHUAN
Server Database Alias -- ZHOUHUAN
Client Database Alias -- ZHOUHUAN
Timestamp -- 20100424162148
Database Partition Number -- 0
Instance -- db2inst1
Sequence Number -- 1
Release ID -- D00
Database Seed -- 7C172526
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- -1
Backup Mode -- 1
Includes Logs -- 1
Compression -- 1
Backup Type -- 0
Backup Gran. -- 16
Status Flags -- 21
System Cats inc -- 1
Catalog Partition Number -- 0
DB Codeset -- UTF-8
DB Territory --
LogID -- 1272095572
LogPath -- /home/db2inst1/db2inst1/NODE0000/SQL00002/SQLOGDIR/
Backup Buffer Size -- 1572864
Number of Sessions -- 1
Platform. -- 12

The proper image file name would be:
ZHOUHUAN.0.db2inst1.NODE0000.CATN0000.20100424162148.001


[1] Buffers processed: ####

Image Verification Complete - successful.

查看LOGPATH一行,然后把恢复出来的日志文件放到里面去。



4.恢复数据库
db2 restore db zhouhuan incremental automatic from /opt/db2backup/ taken at 20100424162148

5.前滚数据库
db2 rollforward db zhouhuan to end of logs and complete

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7338183/viewspace-660700/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: db2 笔记
请登录后发表评论 登录
全部评论

注册时间:2010-04-25

  • 博文量
    30
  • 访问量
    95808