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);
Scenarios that trigger dictionary scheduling:
After a tenant is created, a data dictionary is automatically generated.
When archiving is enabled, a data dictionary is automatically generated.
Notice
The dictionary DUMP service must be enabled (i.e., execute ALL DBMS_DATA_DICT.ENABLE_DUMP() first) for the execution to succeed. Otherwise, it will fail.
Adjust the retention interval for dictionary history
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, in days. Compared to calling DBMS_DATA_DICT.TRIGGER_DUMP with parameters, this stored procedure, when executed, will set the default retention time for subsequent dictionary DUMPs to the specified time (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
CALL DBMS_DATA_DICT.MODIFY_DICT_ITEM_RETENTION(7);
Query OK, 0 rows affected