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 partition balancing task, in seconds.
Considerations
- You can call only the system package in a user tenant. If you call the system package 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 when you manually trigger partition balancing. - If another partition balancing task is in progress, an error
OB_OP_NOT_ALLOWis returned. You must wait for the current partition balancing task to complete before you perform the operation. - If the current tenant has already been partition balanced, an error
OB_PARTITION_ALREADY_BALANCEDis returned.
Examples
Trigger a partition balancing task. The background partition balancing task runs until it is completed.
obclient> CALL DBMS_BALANCE.TRIGGER_PARTITION_BALANCE();Trigger a partition balancing task. The background partition balancing task runs for a maximum of 2 hours. If it is not completed within the time limit, the task is canceled.
obclient> CALL DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(7200);