MON_GET_REBALANCE_STATUS table function - get rebalance progress for a table space

The MON_GET_REBALANCE_STATUS table function returns the status of a rebalance operation on a table space.

Syntax

Read syntax diagramSkip visual syntax diagramMON_GET_REBALANCE_STATUS(tbsp_name ,dbpartitionnum)

The schema is SYSPROC.

Table function parameters

tbsp_name
An input argument of type VARCHAR(128) that specifies the name of the table space to query. If the argument value is null, the function returns information for all table spaces.
dbpartitionnum
An input argument of type INTEGER that specifies a valid database partition in the same instance as the currently connected database when calling this function. Specify -1 for the current database partition, or -2 for all active database partitions. If the NULL value is specified, -1 is set implicitly.

Authorization

One of the following authorities is required to execute the routine:
  • EXECUTE privilege on the routine
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

Default PUBLIC privilege

None

Example

List all active rebalance operations on the database and display their current state and progress.
select 
   varchar(tbsp_name, 30) as tbsp_name, 
   dbpartitionnum, 
   member, 
   rebalancer_mode, 
   rebalancer_status, 
   rebalancer_extents_remaining, 
   rebalancer_extents_processed, 
   rebalancer_start_time 
from table(mon_get_rebalance_status(NULL,-2)) as t

TBSP_NAME                      DBPARTITIONNUM MEMBER REBALANCER_MODE                
------------------------------ -------------- ------ ------------------------------ 
SYSCATSPACE                                 0      0 REV_REBAL                      


REBALANCER_STATUS REBALANCER_EXTENTS_REMAINING REBALANCER_EXTENTS_PROCESSED
----------------- ---------------------------- ----------------------------
ACTIVE                                    6517                            4


REBALANCER_START_TIME 
--------------------------
2011-12-01-12.08.16.000000

  1 record(s) selected.

Usage notes

The MON_GET_REBALANCE_STATUS table function only returns data for a table space if a rebalance is in progress. Otherwise, no data is returned.

Information returned

Table 1. Information returned for MON_GET_REBALANCE_STATUS
Column Name Data Type Description or corresponding monitor element
TBSP_NAME VARCHAR(128) tablespace_name - Table space name monitor element
TBSP_ID BIGINT tablespace_id - Table space identification monitor element
DBPARTITIONNUM SMALLINT dbpartitionnum - Database partition number . Indicates the data being rebalanced.
MEMBER SMALLINT member - Database member. Indicates the processing member doing the rebalance. Rebalance is not supported on Db2® pureScale®
REBALANCER_MODE VARCHAR(30) rebalancer_mode - Rebalancer mode monitor element
REBALANCER_STATUS VARCHAR(10) rebalancer_status - Rebalancer status monitor element
REBALANCER_EXTENTS_
REMAINING
BIGINT rebalancer_extents_remaining - Total number of extents to be processed by the rebalancer monitor element
REBALANCER_EXTENTS_
PROCESSED
BIGINT rebalancer_extents_processed - Number of extents the rebalancer has processed monitor element
REBALANCER_PRIORITY BIGINT rebalancer_priority - Current rebalancer priority monitor element
REBALANCER_LAST_
EXTENT_MOVED
BIGINT rebalancer_last_extent_moved - Last extent moved by the rebalancer monitor element
REBALANCER_START_TIME TIMESTAMP rebalancer_start_time - Rebalancer start time monitor element
REBALANCER_RESTART_
TIME
TIMESTAMP rebalancer_restart_time - Rebalancer restart time monitor element
REBALANCER_SOURCE_
STORAGE_GROUP_NAME
VARCHAR(128) rebalancer_source_storage_group_name - Rebalancer source storage group name monitor element
REBALANCER_SOURCE_
STORAGE_GROUP_ID
INTEGER rebalancer_source_storage_group_id - Rebalancer source storage group identifier monitor element
REBALANCER_TARGET_
STORAGE_GROUP_NAME
VARCHAR(128) rebalancer_target_storage_group_name - Rebalancer target storage group name monitor element
REBALANCER_TARGET_
STORAGE_GROUP_ID
INTEGER rebalancer_target_storage_group_id - Rebalancer target storage group identifier