The TRIGGER_PARTITION_BALANCE procedure is used to manually trigger partition balancing.
Syntax
DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(balance_timeout INT DEFAULT NULL);
Parameters
The balance_timeout parameter specifies the timeout period for the background balancing task, in seconds.
Considerations
- This system procedure can be called only in user tenants. If you call it in the sys tenant, an error
OB_OP_NOT_ALLOWis returned. - If the tenant-level parameter
enable_rebalanceorenable_transferis disabled, an errorOB_OP_NOT_ALLOWis returned. - If another balancing task is in progress, an error
OB_OP_NOT_ALLOWis returned. You must wait for the current task to complete before you can execute the procedure. - If the current tenant has already been balanced, an error
OB_PARTITION_ALREADY_BALANCEDis returned.
Examples
Trigger a partition balancing task. The background balancing task runs until it is completed.
obclient> CALL DBMS_BALANCE.TRIGGER_PARTITION_BALANCE();Trigger a partition balancing task. The background balancing task runs for a maximum of 2 hours. If it is not completed within the time limit, it is canceled.
obclient> CALL DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(7200);