DBMS_DATA_DICT is used to control the scheduling of data dictionaries.
Syntax
Disable scheduling of data dictionaries
CALL DBMS_DATA_DICT.DISABLE_DUMP();
Notice
If the dictionary configuration item dump_data_dictionary_to_log_interval is not set to 0, the execution will fail and prompt the user to set this configuration item to 0.
Enable scheduling of data dictionaries
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 for dictionaries
CALL DBMS_DATA_DICT.MODIFY_DUMP_INTERVAL(INTERVAL_EXPR);
The following scenarios will trigger the scheduling of dictionary generation:
After a tenant is created, the dictionary will be generated immediately.
When archiving is enabled, the dictionary will be generated immediately.
Notice
Before execution, the dictionary DUMP service must be enabled (i.e., execute ALL DBMS_DATA_DICT.ENABLE_DUMP() first). Otherwise, the execution will fail.
Adjust the retention interval for dictionary history records
CALL DBMS_DATA_DICT.MODIFY_DICT_ITEM_RETENTION(DICT_ITEM_RETENTION_BY_DAY)
Parameters
| Parameter | Description | Data type |
|---|---|---|
| DICT_ITEM_RETENTION_BY_DAY |
|
INT |
| INTERVAL_EXPR | Specifies the desired scheduling cycle. This parameter must follow the format of REPEAT_INTERVAL in DBMS_SCHEDULER, and must be enclosed in single quotes. For example, 'FREQ=MINUTELY; INTERVAL=120'. Here:
INTERVAL_EXPR. |
TEXT |
| DICT_ITEM_RETENTION_BY_DAY | Specifies the desired retention time for dictionary history records, in days. Compared to calling DBMS_DATA_DICT.TRIGGER_DUMP with parameters, after this stored procedure is executed, subsequent dictionary DUMPs will default to recycling dictionary history records based on the time specified in this execution (unless DBMS_DATA_DICT.TRIGGER_DUMP is manually executed with parameters). |
INT |
Examples
Disable scheduling of data dictionaries
CALL DBMS_DATA_DICT.DISABLE_DUMP();
Query OK, 0 rows affected
Enable scheduling of data dictionaries
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 dictionaries
CALL DBMS_DATA_DICT.MODIFY_DUMP_INTERVAL('FREQ=MINUTELY; INTERVAL=120');
Query OK, 0 rows affected
Adjust the retention interval for dictionary history records
CALL DBMS_DATA_DICT.MODIFY_DICT_ITEM_RETENTION(7);
Query OK, 0 rows affected
