表空间删除数据和表后,空间不释放

各位专家:      昨天一个表空间满了,然后业务那边把表删除了,但是到今天早上空间都没有释放,重启库也不行;
1、目前表空间情况
TBSP_NAME            TBSP_TYPE DBPARTITIONNUM      TOTAL_MB             USED_MB           FREE_MB    PAGE_SIZE  
TBS_DATA_01          LARGE                        0               427008               198296               228668       32768
TBS_DATA_01          LARGE                        1               427008               194741                 6186       32768
TBS_DATA_01          LARGE                        2               427008               198561               228403       32768
TBS_DATA_01          LARGE                        3               427008               196536               230420       32768
TBS_DATA_01          LARGE                        4               427008               196722                 4123       32768
TBS_DATA_01          LARGE                        5               427008               197230               229726       32768
TBS_DATA_01          LARGE                        6               427008               195061                 6183       32768
TBS_DATA_01          LARGE                        7               427008               197188               229768       32768
TBS_DATA_01          LARGE                        8               427008               198784                 1583       32768
TBS_DATA_01          LARGE                        9               427008               196283                 4299       32768
TBS_DATA_01          LARGE                       10               427008               198359                 2237       32768
TBS_DATA_01          LARGE                       11               427008               197454                 3131       32768
TBS_DATA_01          LARGE                       12               427008               199590                  520       32768
TBS_DATA_01          LARGE                       13               427008               198822                 1276       32768
TBS_DATA_01          LARGE                       14               427008               203751                    0       32768
TBS_DATA_01          LARGE                       15               427008               198711                 1532       32768


我们看到427008-203751=!0


2、试着用db2dart来降低高水位:
Action option: RHWM
Tablespace-ID: 4

Warning: The database state is not consistent.
Warning: Errors reported about reorg rows may be due to the inconsistent state of the database.
Connecting to Buffer Pool Services...
Highwater mark processing - phase start.
Reduce highwater mark processing - phase start.
Error: No changes will be made because the database is not consistent.
Reduce highwater mark processing - phase end.


¥db2 get db cfg for gzopdb | grep -i con      

Database is consistent                                  = NO--个人认为这个指标并不意味着什么

3、重启数据也还是没有解决问题

4、表空间状态
Tablespace ID                        = 4
Name                                 = TBS_DATA_01
Type                                 = Database managed space
Contents                             = All permanent data. Large table space.
State                                = 0x0000
   Detailed explanation:
     Normal
Total pages                          = 13664256
Useable pages                        = 13664192
Used pages                           = 6345472
Free pages                           = 7318720
High water mark (pages)              = 9881184
Page size (bytes)                    = 32768
Extent size (pages)                  = 32
Prefetch size (pages)                = 384
Number of containers                 = 2


麻烦哪位专家指导一下,谢谢
参与27

18同行回答

db2bird1db2bird1  数据库管理员 , enmo
结贴:应用人员通过两种方式删的表:1、alter table xx not logged initial empty(语法我这会儿不记得了),drop table xx; 用这种方式删了3000多个表。 2、直接使用drop table xx;删了2000多个表。最后发现这5000个表占用的IT空间一直不释放,找IBM 800支持,无果,也没能定位是什么问...显示全部
结贴:
应用人员通过两种方式删的表:1、alter table xx not logged initial empty(语法我这会儿不记得了),drop table xx; 用这种方式删了3000多个表。 2、直接使用drop table xx;删了2000多个表。
最后发现这5000个表占用的IT空间一直不释放,找IBM 800支持,无果,也没能定位是什么问题。
没办法,最后是通过将这个表空间的表全部导出,然后删除表空间再重建,再将表导入后解决的。收起
系统集成 · 2015-09-10
浏览3367
duanzhihuiduanzhihui  数据库管理员 , IBM成都GDC
db2pd -tablespace先看下有没有pending free space,如果有,执行db2 list tablespaces show detail看能不能释放。不行的话就执行用db2dart一步步降了,推荐先/DHWM看看当前HWM的holder是谁显示全部
db2pd -tablespace先看下有没有pending free space,如果有,执行db2 list tablespaces show detail看能不能释放。不行的话就执行用db2dart一步步降了,推荐先/DHWM看看当前HWM的holder是谁收起
互联网服务 · 2015-08-10
浏览3421
DB-TrendSetterDB-TrendSetter  数据库架构师 , 公司
db2dart 使用时,数据库要offline显示全部
db2dart 使用时,数据库要offline收起
电信运营商 · 2015-09-11
浏览3332
y5_sety5_set  其它 , 不告诉你
查看表sysibmadm.snaptbsp_part 里面有总表孔家安、可用表空间、已使用、剩余 还有一个字段是 free pending ,直接drop表数据不会立马释放的 这些页就是free pending的值,执行 db2 "alter tablespace TBS_DATA_01 lower high water mark " 可以释放这些表空间...显示全部
查看表sysibmadm.snaptbsp_part 里面有总表孔家安、可用表空间、已使用、剩余 还有一个字段是
free pending ,直接drop表数据不会立马释放的 这些页就是free pending的值,执行 db2 "alter tablespace TBS_DATA_01 lower high water mark " 可以释放这些表空间收起
互联网服务 · 2015-08-07
浏览3321
DB-TrendSetterDB-TrendSetter  数据库架构师 , 公司
使用alter tablespace 子句reduce high  water  mark显示全部
使用alter tablespace 子句reduce high  water  mark收起
电信运营商 · 2015-08-05
浏览1809
db2bird1db2bird1  数据库管理员 , enmo
回复 16# duanzhihui 这个问题最终还是没能通过命令解决。然后是通过把数据导出来,然后删除表空间后重建,再导入数据来解决的。显示全部
回复 16# duanzhihui
这个问题最终还是没能通过命令解决。然后是通过把数据导出来,然后删除表空间后重建,再导入数据来解决的。收起
系统集成 · 2015-09-10
浏览3528
duanzhihuiduanzhihui  数据库管理员 , IBM成都GDC
回复 15# db2bird1     那到底是什么问题?显示全部
回复 15# db2bird1


    那到底是什么问题?收起
互联网服务 · 2015-09-09
浏览3416
db2bird1db2bird1  数据库管理员 , enmo
回复 14# duanzhihui 那天删了5000多个表。IBM售后说不是高水位问题,降了高水位也没用显示全部
回复 14# duanzhihui

那天删了5000多个表。IBM售后说不是高水位问题,降了高水位也没用收起
系统集成 · 2015-08-11
浏览3266
db2bird1db2bird1  数据库管理员 , enmo
回复 12# y5_set 你这个语法命令只在9.7支持显示全部
回复 12# y5_set

你这个语法命令只在9.7支持收起
系统集成 · 2015-08-11
浏览3287
db2bird1db2bird1  数据库管理员 , enmo
回复 10# tianshizuoyi V9.5的官方文档:The ALTER TABLESPACE statement is used to modify an existing table space inthe following ways:v Add a container to, or drop a container from a DMS table space; that is, a tablespace created with the MANAGED BY DATA...显示全部
回复 10# tianshizuoyi
V9.5的官方文档:The ALTER TABLESPACE statement is used to modify an existing table space in
the following ways:
v Add a container to, or drop a container from a DMS table space; that is, a table
space created with the MANAGED BY DATABASE option.
v Modify the size of a container in a DMS table space.
v Add a container to an SMS table space on a database partition that currently has
no containers.
v Modify the PREFETCHSIZE setting for a table space.
v Modify the BUFFERPOOL used for tables in the table space.
v Modify the OVERHEAD setting for a table space.
v Modify the TRANSFERRATE setting for a table space.
v Modify the file system caching policy for a table space.


V9.7的官方文档:
The ALTER TABLESPACE statement is used to modify an existing table space in the following ways:Add a container to, or drop a container from a DMS table space; that is, a table space created with the MANAGED BY DATABASE option.Modify the size of a container in a DMS table space.Lower the high water mark for a DMS table space through extent movement.Add a container to an SMS table space on a database partition that currently has no containers.Modify the PREFETCHSIZE setting for a table space.Modify the BUFFERPOOL used for tables in the table space.Modify the OVERHEAD setting for a table space.Modify the TRANSFERRATE setting for a table space.Modify the file system caching policy for a table space.Enable or disable auto-resize for a DMS or automatic storage table space.Rebalance a regular or large automatic storage table space.收起
系统集成 · 2015-08-07
浏览3582

提问者

db2bird1
数据库管理员enmo

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2015-08-05
  • 关注会员:2 人
  • 问题浏览:13823
  • 最近回答:2015-09-11
  • X社区推广