1.执行如下命令,查看表空间状态:
db2 list tablespaces show detail
返回如下结果:
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1810
Useable pages = 1810
Used pages = 1810
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 16
Number of containers = 1
Tablespace ID = 1
Name = TEMPSPACE1
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 16
Number of containers = 1
Tablespace ID = 2
Name = USERSPACE1
Type = System managed space
Contents = Any data
State = 0x0008
Detailed explanation:
Load pending
Total pages = 5682
Useable pages = 5682
Used pages = 5682
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 16
Number of containers = 1
State change tablespace ID = 2
State change object ID = 4
2.分析以上结果
从上面可以看到,Tablespace ID= 2的 State= 0x0008,不是0x0000,不正常,其State change object ID= 4
3.查找出使表空间不正常的表名:
db2 select tabschema, tabname, tableid from syscat.tables where tableid=4
比如返回值是db2inst1.sales
4.执行load中止:
db2 load from /dev/null of ixf terminate into db2inst1.sales
OK
nul:
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9893498/viewspace-1030431/ ,如需转载,请注明出处,否则将追究法律责任。