Reclaiming space after records are deleted

Under normal conditions, when rows are deleted in a DB2 table, the disk space taken up by those rows is not released. Rather, the disk space is reused when additional rows are inserted. Over time, this means that a database and its tables can grow to be large and use more disk space.

About this task

If it is necessary to recover the space used by deleted accounting records, you can choose one of two options. Both options require first stopping the SafeLinx Server and any applications that access the accounting database (for example, wg_acct).

Procedure

After all database applications that access the accounting database are stopped, connect to the database with the appropriate database instance and either:
  1. Run db2 reorg table wg.tablename, where tablename is one of acctinfo, acctdiscinfo, acctsmsinfo.
  2. Run db2 drop table wg.tablename, where tablename is one of acctinfo, acctdiscinfo, acctsmsinfo. This option can be used only if the table is already empty, that is that all rows are deleted.