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