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
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.