RUN_INSPECTION is used to manually perform a Root Service inspection for the current tenant to verify the consistency of internal metadata. The inspection includes the following items:
- Integrity of system statistics (sys_stat)
- Integrity of system parameters (sys_param)
- Consistency of system table schemas
- The correctness of the data version (data_version).
Limitations and considerations
Both the system tenant and user tenants can perform a Root Service self-check for themselves.
Syntax
DBMS_SCHEMA.RUN_INSPECTION();
Usage instructions
The system has a built-in scheduled task named SCHEDULED_RUN_INSPECTION to periodically perform self-checks on the Root Service. The default interval is 1,500 seconds. You can set the time interval for triggering the scheduled task using the repeat_interval attribute of the DBMS_SCHEDULER.SET_ATTRIBUTE subprogram. For example, to change the trigger interval of the SCHEDULED_RUN_INSPECTION scheduled task to 30 minutes:
obclient(root@mysql001)[(none)]> CALL DBMS_SCHEDULER.SET_ATTRIBUTE('SCHEDULED_RUN_INSPECTION', 'repeat_interval', 'FREQ=SECONDLY; INTERVAL=1800');
If the scheduled inspection time has not yet arrived, you can manually call the DBMS_SCHEMA.RUN_INSPECTION() subprogram to quickly perform a Root Service inspection.
Examples
The user tenant performs a root service self-check on itself.
obclient(root@mysql001)[(none)]> CALL DBMS_SCHEMA.RUN_INSPECTION();
