The DBMS_DATA_DICT package is used to control the scheduling of data dictionaries.
Syntax
Prohibit Scheduling Data Dictionaries
CALL DBMS_DATA_DICT.DISABLE_DUMP();
Notice
If the runtime dictionary parameter dump_data_dictionary_to_log_interval is not set to 0, the operation fails and a message prompting you to set this parameter to 0 is displayed.
Allow Scheduling Data Dictionary
CALL DBMS_DATA_DICT.ENABLE_DUMP();
Manually trigger dictionary generation
CALL DBMS_DATA_DICT.TRIGGER_DUMP(DICT_ITEM_RETENTION_BY_DAY);
Adjust the scheduled DUMP cycle of a dictionary
CALL DBMS_DATA_DICT.MODIFY_DUMP_INTERVAL(INTERVAL_EXPR);
Scenarios that trigger dictionary generation scheduling:
A data dictionary is automatically generated immediately after a tenant is created.
Data dictionary generation is automatically triggered immediately after archiving is enabled.
Notice
The dictionary DUMP service must be enabled during execution (that is, execute ALL DBMS_DATA_DICT.ENABLE_DUMP() first). Otherwise, the execution will fail.
Adjust the recycling interval for dictionary history records
CALL DBMS_DATA_DICT.MODIFY_DICT_ITEM_RETENTION(DICT_ITEM_RETENTION_BY_DAY)
Parameters
Parameter |
Note |
Data types |
|---|---|---|
| DICT_ITEM_RETENTION_BY_DAY |
|
INT |
| INTERVAL_EXPR | Indicates the desired scheduling cycle. This parameter must follow the DBMS_SCHEDULER of REPEAT_INTERVAL The writing format is as follows, and it must be enclosed in single quotes. For example: 'FREQ=MINUTELY; INTERVAL=120'. Where:
INTERVAL_EXPR. |
TEXT |
| DICT_ITEM_RETENTION_BY_DAY | Represents the expected recycling time of dictionary history records, in days. and DBMS_DATA_DICT.TRIGGER_DUMP Compared with a call without parameters, after this stored procedure is executed, subsequent dictionary DUMPs will by default recycle the dictionary history records based on the time specified this time (unless you manually execute a parameterized DBMS_DATA_DICT.TRIGGER_DUMP(stored procedures). |
INT |
Examples
Prohibit Scheduling Data Dictionaries
CALL DBMS_DATA_DICT.DISABLE_DUMP();
Query OK, 0 rows affected
Allow Scheduling Data Dictionary
CALL DBMS_DATA_DICT.ENABLE_DUMP();
Query OK, 0 rows affected
Manually trigger dictionary generation
CALL DBMS_DATA_DICT.TRIGGER_DUMP(7);
Query OK, 0 rows affected
Adjust the scheduled DUMP cycle for the dictionary
CALL DBMS_DATA_DICT.MODIFY_DUMP_INTERVAL('FREQ=MINUTELY; INTERVAL=120');
Query OK, 0 rows affected
Adjust the recycling interval of dictionary history records
CALL DBMS_DATA_DICT.MODIFY_DICT_ITEM_RETENTION(7);
Query OK, 0 rows affected