首页
登录 | 注册

DB2在线备份全库与备份表空间的表空间状态调查

 

1、对数据库进行在线全备

Db2 backup database test online

 

2、查看备份过程中的表空间状态

db2  "select DBPARTITIONNUM, tbsp _id,substr(tbsp _name,1,20) as tbsname,tbsp _state from sysibmadm.tbsp>

 

DBPARTITIONNUM TBSP_ID              TBSNAME              TBSP_STATE                                                                                                                                                                                                                                                     

-------------- -------------------- -------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

             0                    0 SYSCATSPACE          BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    1 SYSTOOLSPACE         BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    2 SYSTOOLSTMPSPACE     NORMAL                                                                                                                                                                                                                                                         

             0                    3 PSAPTEMP             NORMAL                                                                                                                                                                                                                                                         

             0                    4 PSAPBTABD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    5 PSAPBTABI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    6 PSAPCLUD             BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    7 PSAPCLUI             BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    8 PSAPDDICD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                    9 PSAPDDICI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   10 PSAPDOCUD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   11 PSAPDOCUI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   12 PSAPEL46CD           BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   13 PSAPEL46CI           BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   14 PSAPES46CD           BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   15 PSAPES46CI           BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   16 PSAPLOADD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   17 PSAPLOADI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   18 PSAPPOOLD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   19 PSAPPOOLI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   20 PSAPPROTD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   21 PSAPPROTI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   22 PSAPSOURCED          BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   23 PSAPSOURCEI          BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   24 PSAPSTABD            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   25 PSAPSTABI            BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   26 PSAPUSER1D           BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

             0                   27 PSAPUSER1I           BACKUP_IN_PROGRESS                                                                                                                                                                                                                                             

 

  28 record(s) selected.

 

可以看见,备份过程中,除了俩个临时表空间(临时表空间不会被备份)的状态是normal,其他的表空间都是在备份一启动就被设置为backup in progress状态。

也可以用list命令查看

db2 list tablespaces show detail

 

           Tablespaces for Current Database

 

 Tablespace ID                        = 0

 Name                                 = SYSCATSPACE

 Type                                 = Database managed space

 Contents                             = All permanent data. Regular table space.

 State                                = 0x0800

   Detailed explanation:

     Backup in progress

 Total pages                          = 436800

 Useable pages                        = 436480

 Used pages                           = 436320

 Free pages                           = 160

 High water mark (pages)              = 436320

 Page size (bytes)                    = 4096

 Extent size (pages)                  = 32

 Prefetch size (pages)                = 3200

 Number of containers                 = 10

 Minimum recovery time                = 2010-11-28-01.19.43.000000

 

 Tablespace ID                        = 1

 Name                                 = SYSTOOLSPACE

 Type                                 = Database managed space

 Contents                             = All permanent data. Regular table space.

 State                                = 0x0800

   Detailed explanation:

     Backup in progress

 Total pages                          = 25600

 Useable pages                        = 25520

 Used pages                           = 2656

 Free pages                           = 22864

 High water mark (pages)              = 2656

 Page size (bytes)                    = 4096

 Extent size (pages)                  = 8

 Prefetch size (pages)                = 800

 Number of containers                 = 10

 Minimum recovery time                = 2009-03-28-14.40.05.000000

 

 Tablespace ID                        = 2

 Name                                 = SYSTOOLSTMPSPACE

 Type                                 = System managed space

 Contents                             = User Temporary data

 State                                = 0x0000

   Detailed explanation:

     Normal

 Total pages                          = 10

 Useable pages                        = 10

 Used pages                           = 10

 Free pages                


相关文章

  • 通过模拟DB2在线全备失败来调查DB2的在线备份
    backup_test_his.txt  1.在一个CLP中启动一个备份进程 db2 backup database nit online to /db2/NIT/db2backup 2.在另一个CLP中,使用命令进行查看此备份进程 db2 ...
  • 问题描述  : db2level : DB2 v9.7.0.9 OS : aix 7.1 目的是要测试 cross-platform migration ( from AIX to Linux), 然后在使用 db2move export ...
  • 在实际工作中,一个MySQL实例中可能有多个database.而我们备份时,通常采用完全备份,将所有database都备份到一个文件中. 但是,偶尔会遇到只恢复一个database或者一个表的情况.怎么解决呢? 一.利用全备恢复一个库(da ...
  • 1.1.开启归档日志 db2 => connect to mydb    数据库连接信息    数据库服务器         = DB2/LINUXX8664 9.7.5  SQL 授权标识         = DB2INST2  本 ...
  • 总的思想如下: 对于生产系统,建议回退的方法如下: 对于生产系统,数据库是最重要的部分,因此我们建议采用如下的两种数据备份方式,充分保护数据库的安全:在shutdown数据库之前,先用数据库自己的命令对全库做一次热备份:shutdown数据 ...

2019 unjeep.com webmaster#unjeep.com
12 q. 0.015 s.
京ICP备10005923号