ITPub博客

首页 > Linux操作系统 > Linux操作系统 > DB2恢复错误 SQL2059W

DB2恢复错误 SQL2059W

原创 Linux操作系统 作者:fjmingyang 时间:2019-04-04 11:09:04 0 删除 编辑
昨日在恢复数据库冷备份过程中碰到如下错误

restore database testdb  continue
SQL2059W  A device full warning was encountered on device "DATATBS00_8K".
Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) c
SQL2059W  A device full warning was encountered on device "DATATBS00_8K".
Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) c
SQL2059W  A device full warning was encountered on device "DATATBS00_8K".
Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) d

 SQL2059W 的DB2错误帮助如下:

C:\Documents and Settings\Administrator>db2 ? SQL2059W


SQL2059W在设备 "<设备>" 上遇到设备满警告。

解释:

在数据库实用程序处理期间,遇到设备满警告。

实用程序正在等待响应,以继续执行。

用户响应:

更正设备满状态,然后返回至实用程序,并用正确的调用程序操作参数指示
处理是应继续还是应终止。


===========================================================================

SQL2059W  A device full warning was encountered on device "DATATBS00_8K".
中“DATATBS00_8K ”指的是 表空间的名称

我们看下源库中该表空间的信息


Tablespace ID                        = 4
Name                                 = DATATBS00_8K
Type                                 = Database managed space
Contents                             = Any data
State                                = 0x0000
  Detailed explanation:
    Normal
Total pages                          = 7500000
Useable pages                        = 7499904
Used pages                           = 6205216
Free pages                           = 1294688
High water mark (pages)              = 6754816
Page size (bytes)                    = 8192
Extent size (pages)                  = 32
Prefetch size (pages)                = 32
Number of containers                 = 3

该表空间的Used pages为 6205216

db2 => list tablespace containers for 4

            Tablespace Containers for Tablespace 4

 Container ID                         = 0
 Name                                 = /vg03fs01/db2/db2inst1/testdb/dbs/con041
 Type                                 = File

 Container ID                         = 1
 Name                                 = /vg03fs01/db2/db2inst1/testdb/dbs/con042
 Type                                 = File

 Container ID                         = 2
 Name                                 = /vg03fs01/db2/db2inst1/testdb/dbs/con043
 Type                                 = File


而我们恢复脚本的该表空间的定义如下:

set tablespace containers for 4 using (file '/home/testdbs/con041' 2000000, file '/home/testdbs/con042' 2000000);

2000000+2000000=4000000 < 6205216

故恢复过程中出现SQL2059W错误

另外细心的你可能注意到:源库该表空间有三个contianer,而恢复脚本只配置了2个container,这样会不会有问题呢?测试结果表明,这是允许的!DB2并不关心你新库表空间container的个数,只要新表空间的总大小不小于原表空的已使用空间大小!



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

请登录后发表评论 登录
全部评论

注册时间:2006-04-03

  • 博文量
    66
  • 访问量
    49118