TRIGGER_PARTITION_BALANCE is used to manually trigger partition balancing.
Syntax
DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(balance_timeout BINARY_INTEGER DEFAULT NULL);
Parameters
The balance_timeout parameter specifies the timeout period for the background partition balancing task, in seconds.
Considerations
- This system package can be called only in a user tenant. 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 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 task to complete before you perform this operation. - If the current tenant has already been partition balanced, an error
OB_PARTITION_ALREADY_BALANCEDis returned.
Examples
Trigger partition balancing once. The background partition balancing task runs until it is completed.
obclient> BEGIN DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(); END;Trigger partition balancing. The background partition balancing task runs for a maximum of 2 hours. If it is not completed within the time limit, it is canceled.
obclient> BEGIN DBMS_BALANCE.TRIGGER_PARTITION_BALANCE(7200); END;