The system has a built-in scheduled partition balancing task SCHEDULED_TRIGGER_PARTITION_BALANCE. You can view the parameter configurations of the scheduled partition balancing task as needed in a user tenant.
Procedure
Log in to a MySQL tenant or an Oracle tenant of the cluster as the tenant administrator.
Here is an example of the connection command. Replace the parameters with those in your actual environment.
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 in the current tenant.
The
DBA_SCHEDULER_JOBSview displays the information about all scheduled tasks in the current tenant.MySQL-compatible modeOracle-compatible modeThe 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 statement is as follows:
obclient [SYS]> SELECT JOB_NAME, JOB_ACTION, START_DATE, REPEAT_INTERVAL, ENABLED, NEXT_RUN_DATE,MAX_RUN_DURATION, COMMENTS FROM SYS.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 setIn the query result:
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 content executed 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 trigger interval and frequency of the scheduled partition balancing task. The default value is once a day.ENABLED: indicates whether the scheduled partition balancing task is enabled.1indicates that the task is enabled, and0indicates that the task is disabled. The default value is1.NEXT_RUN_DATE: the time when the scheduled partition balancing task is triggered next time.MAX_RUN_DURATION: the timeout period for executingJOB_ACTION. The default value is 7200, in seconds.
For more information about the fields in the
DBA_SCHEDULER_JOBSview, see DBA_SCHEDULER_JOBS.
