Scaling tablespace containers

Sufficient free space must be available in a tablespace for the database to function properly. Backup Object Manager provides an automated table space scaling function that allows the location and size of table space container to be redefined. This function also helps prevent I/O-intensive table space rebalancing that can be detected by DB2®.

About this task

This graphic shows that 98 percent of the SYSCATSPACE table space of the original system is being used. Disk 1 has 4 percent free space while 100 percent of the second container is used. The free space available in a table space can be increased as part of the redefinition feature during a redirected restore. The goal is to achieve an overall filling rate for the target side of 70 percent. This rate can be achieved by manually increasing the free space that the first container must provide at 20 percent and 40 percent for the second container. This type of adjustment, in combination with a redirected restore operation, requires no further resizing tasks for the table space containers after the restore completes.

Figure 1. Tablespace scaling

The graphic shows the first two disks of the same size with an overall table space fill rate of 98 percent. After the Redirected Restore the overall table space fill rate is 70 percent, which is shown in the lower part of the graphic. The graphic is described in detail in the following text.
Backup Object Manager simplifies the table space resizing process by providing an automatic table space scaling function. It can be used in combination with any mode of redirected restore by specifying the -S option with a floating-point sizing factor. Consider these factors when you resize table spaces:
  • A value of '1' indicates that the target table space is 100 percent the size of the original (nothing is changed).
  • A value greater than one increases the target table space. For example, a value of 1.1 increases the target table space by 10 percent to a target value of 110 percent of the original.
  • A value less than 1 decreases the target table space. For example, a value of 0.9 decreases the target table space by 10 percent to a value of 90 percent of the original.
Therefore, manual adaptation of the table space containers can be replaced by the following procedure by using the Backup Object Manager redirected restore function:
  1. Issue this Backup Object Manager query to determine the original fill rate of the table space:
    backom -c q_tdi -a DB2 source alias -t timestamp -m detailed 
  2. Calculate the table space scaling factor by using this formula:
    scaling factor = original fill rate / new fill rate
    For example:
    scaling factor = 0.98 / 0.7 = 1.4
  3. Issue this command to begin the Backup Object Manager redirected restore:
    backom -c rr_db_type -a DB2 source alias,DB2 target alias -t timestamp ...
    ...-T SYSCATSPACE -s 1.4
    After the redirected restore completes successfully, the SYSCATSPACE table space on the target side is increased by 40 percent during table space container redefinition. The new overall fill rate of the SYSCATSPACE in the target database is now 70 percent.