TRIGGER_PARTITION_BALANCE is used to manually trigger partition balancing.
Syntax
DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(balance_timeout INT DEFAULT NULL);
Parameters
The balance_timeout parameter is in seconds and specifies the timeout period for the background balancing task.
Considerations
- This system package can only be called in user tenants. Calling it from the sys tenant will result in an error
OB_OP_NOT_ALLOW. - When the tenant-level parameter
enable_rebalanceorenable_transferis disabled, an errorOB_OP_NOT_ALLOWis returned, indicating that manual partition rebalancing is not allowed. - When another balancing task is in progress, the error
OB_OP_NOT_ALLOWis returned. You must wait for the current balancing task to complete before proceeding. - If the current tenant is already partition-balanced, the error
OB_PARTITION_ALREADY_BALANCEDis returned.
Examples
Triggers partition balancing once. The background balancing task runs until completion without a timeout.
obclient> CALL DBMS_BALANCE.TRIGGER_PARTITION_BALANCE();After partition balancing is triggered, the background balancing task runs for at most 2 hours and is canceled if it does not complete within this time.
obclient> CALL DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(7200);