The system provides a built-in scheduled partition balancing task named SCHEDULED_TRIGGER_PARTITION_BALANCE. User tenants can view the parameters of this task as needed.
Procedure
Log in to the MySQL-compatible or Oracle-compatible user tenant of the cluster.
The following example shows how to connect to the database. Please adjust the connection details according to your actual environment.
obclient -h10.xx.xx.xx -P2883 -uroot@mysql_tenant#obdemo -p***** -AExecute the following statement to view the parameters of the scheduled partition balancing task in the current tenant.
The
DBA_SCHEDULER_JOBSview displays all the 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'\GAn example of the 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 setThe query result is described as follows:
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 of 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 cycle and frequency of the scheduled partition balancing task. The default value is once every 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 of theJOB_ACTIONexecution. The default value is 7200, in seconds.
For more information about the
DBA_SCHEDULER_JOBSview, see DBA_SCHEDULER_JOBS.