DB2备份集的检查

1. v9.5以后默认就包含log的备份了,以前的版本需要在备份语句中加入include logs。

2.检查备份集中是否包含log:  db2ckbkp -h filename



[db2inst1@DB2test183 backup]$ db2ckbkp -h  SAMPLE.0.db2inst1.DBPART000.20140116124054.001 




=====================
MEDIA HEADER REACHED:
=====================
        Server Database Name           -- SAMPLE
        Server Database Alias          -- SAMPLE
        Client Database Alias          -- SAMPLE
        Timestamp                      -- 20140116124054
        Database Partition Number      -- 0
        Instance                       -- db2inst1
        Database Configuration Type    -- 0 (Non-shared data)
        Sequence Number                -- 1
        Database Member ID             -- 0
        Release ID                     -- 0x1000 (DB2 v10.5)
        AL version                     -- V:10 R:5 M:0 F:1 I:0 SB:0
        Database Seed                  -- 0x6942A140
        DB Comment's Codepage (Volume) -- 0
        DB Comment (Volume)            --
        DB Comment's Codepage (System) -- 0
        DB Comment (System)            --
        Authentication Value           -- 255 (Not specified)
        Backup Mode                    -- 0 (Offline)
        Includes Logs                  -- 0 (No)
        Compression                    -- 0 (Uncompressed)
        Backup Type                    -- 0 (Database-level)
        Backup Granularity             -- 0 (Non-incremental)
        Merged Backup Image            -- 0 (No)
        Status Flags                   -- 0x1
                                          Consistent on this member
        System Catalogs in this image  -- 1 (Yes)
        Catalog Partition Number       -- 0
        DB Codeset                     -- UTF-8
        DB Territory                   -- US
        LogID                          -- 1389261152
        LogPath                        -- /home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/
        Backup Buffer Size             -- 3936256 (961 4K pages)
        Number of Sessions             -- 1
        Platform                       -- 0x1E (Linux-x86-64)


 The proper image file name would be:
SAMPLE.0.db2inst1.DBPART000.20140116124054.001




[1] Buffers processed:  ############################################


Image Verification Complete - successful.


[db2inst1@DB2test183 backup]$ ls
BBB.0.db2inst1.DBPART000.20140116103516.001
BBB.0.db2inst1.DBPART000.20140116123436.001
SAMPLE.0.db2inst1.DBPART000.20140116124054.001
SAMPLE.0.db2inst1.DBPART000.20140116124600.001
[db2inst1@DB2test183 backup]$ db2ckbkp -h  SAMPLE.0.db2inst1.DBPART000.20140116124600.001 




=====================
MEDIA HEADER REACHED:
=====================
        Server Database Name           -- SAMPLE
        Server Database Alias          -- SAMPLE
        Client Database Alias          -- SAMPLE
        Timestamp                      -- 20140116124600
        Database Partition Number      -- 0
        Instance                       -- db2inst1
        Database Configuration Type    -- 0 (Non-shared data)
        Sequence Number                -- 1
        Database Member ID             -- 0
        Release ID                     -- 0x1000 (DB2 v10.5)
        AL version                     -- V:10 R:5 M:0 F:1 I:0 SB:0
        Database Seed                  -- 0x6942A140
        DB Comment's Codepage (Volume) -- 0
        DB Comment (Volume)            --
        DB Comment's Codepage (System) -- 0
        DB Comment (System)            --
        Authentication Value           -- 255 (Not specified)
        Backup Mode                    -- 1 (Online)
        Includes Logs                  -- 1 (Yes)
        Compression                    -- 0 (Uncompressed)
        Backup Type                    -- 0 (Database-level)
        Backup Granularity             -- 0 (Non-incremental)
        Merged Backup Image            -- 0 (No)
        Status Flags                   -- 0x21
                                          Consistent on this member
                                          LOGARCHMETH1 is set
        System Catalogs in this image  -- 1 (Yes)
        Catalog Partition Number       -- 0
        DB Codeset                     -- UTF-8
        DB Territory                   -- US
        LogID                          -- 1389261152
        LogPath                        -- /home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/
        Backup Buffer Size             -- 2101248 (513 4K pages)
        Number of Sessions             -- 1
        Platform                       -- 0x1E (Linux-x86-64)


 The proper image file name would be:
SAMPLE.0.db2inst1.DBPART000.20140116124600.001




[1] Buffers processed:  #################################################################################


Image Verification Complete - successful.



3.检查当前备份机需要前滚的日志列表:   db2ckbkp -a  filename


[db2inst1@DB2test183 backup]$ db2ckbkp -a  SAMPLE.0.db2inst1.DBPART000.20140116124600.001 |grep -i "file number"
                      File Number   [000] = 0
                      File Number   [001] = 1




___________________________________________________________________________________

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Author:   laven54 (lurou)

Email:    laven54@163.com

Blog:      http://blog.csdn.net/laven54






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值