This article describes how to use the DB2DART tool to reduce the high-level mark of tablespaces managed by the DB2 database. The High Level mark (HWM) for the DB2 database management (DMS) tablespace refers to the maximum number of data pages that have been used in the tablespace. If you use: db2listtablespacesshowdetail, you can see that the number of used pages of a DMS tablespace is less
This article describes how to use the DB2DART tool to reduce the high-level mark of tablespaces managed by the DB2 database. The High Level mark (HWM) for the DB2 database management (DMS) tablespace refers to the maximum number of data pages that have been used in the tablespace. If you use: db2 list tablespaces show detail, you can see that the number of used pages of a DMS tablespace is less
This article describes how to use the DB2DART tool to reduce the high-level mark of a table space managed by DB2.
The High Level mark (HWM) for the DB2 database management (DMS) tablespace refers to the maximum number of data pages that have been used in the tablespace. If you use:
Db2 list tablespaces show detail
If you see that the number of used pages in a DMS tablespace is lower than the mark of the High Level, you may use the following method to reduce the mark:
Reorganizing a table in a tablespace
Export the data in a table, delete it, recreate the table, and import the data.
In the above method, first you need to find the table that holds the high-water mark, which can be used after the DB2DART command (can be used after the instance is stopped) with the/DHWM option to provide the tablespace identifier, then, obtain it from the report file generated by the command.
To learn about how to reduce HWM by performing operations on the table, you can use DB2DART and the/LHWM option to obtain it from the generated report file. When the/LHWM option is used, the user is required to give the tablespace identifier and the number of pages to which the HWM is to be reduced (although the HWM cannot be guaranteed to be reduced to the expected value). If the value is 0, it indicates that the HWM is reduced by DB2 to the minimum value that can be reached.
In addition, you can use the DB2DART plus/RHWM option to remove the space ing data blocks that are no longer needed in the DMS tablespace to reduce HWM, these spatial ing data blocks will not be deleted when the mapped data is deleted.