The system provides a built-in scheduled partition balancing task named SCHEDULED_TRIGGER_PARTITION_BALANCE. You can view the parameter configurations of this task for your tenant as needed.
Procedure
Log in to the user tenant of the cluster.
Note that you must specify the corresponding options in the following sample code based on your actual database configurations.
obclient -h10.xx.xx.xx -P2883 -uroot@mysql_tenant#obdemo -p***** -AExecute the following statement to view the configurations of the scheduled partition balancing task for the current tenant.
The
DBA_SCHEDULER_JOBSview displays information about all scheduled tasks in the current tenant.The statement is as follows:
obclient [oceanbase]> SELECT JOB_NAME, JOB_ACTION, START_DATE, REPEAT_INTERVAL, ENABLED, NEXT_RUN_DATE,MAX_RUN_DURATION, COMMENTS FROM oceanbase.DBA_SCHEDULER_JOBS WHERE job_name = 'SCHEDULED_TRIGGER_PARTITION_BALANCE'\GThe query result is as follows:
*************************** 1. row *************************** JOB_NAME: SCHEDULED_TRIGGER_PARTITION_BALANCE JOB_ACTION: DBMS_BALANCE.TRIGGER_PARTITION_BALANCE() START_DATE: 2024-06-14 00:00:00.000000 REPEAT_INTERVAL: FREQ=DAILY; INTERVAL=1 ENABLED: 1 NEXT_RUN_DATE: 2024-06-15 00:00:00.000000 MAX_RUN_DURATION: 7200 COMMENTS: used to auto trigger partition balance 1 row in setwhere:
JOB_NAME: the name of the scheduled task. In this example,SCHEDULED_TRIGGER_PARTITION_BALANCEis the name of the scheduled partition balancing task.JOB_ACTION: the operation to be performed by the scheduled partition balancing task.START_DATE: the trigger time of the scheduled partition balancing task. The default value is 00:00 every day.REPEAT_INTERVAL: the interval and frequency of the scheduled partition balancing task. The default value is once a day.ENABLED: specifies whether the scheduled partition balancing task is enabled.1indicates enabled, and0indicates disabled. The default value is1.NEXT_RUN_DATE: the next trigger time of the scheduled partition balancing task.MAX_RUN_DURATION: the timeout period for executingJOB_ACTION. The default value is 7200, in seconds.
For more information about the columns in the
DBA_SCHEDULER_JOBSview, see DBA_SCHEDULER_JOBS.