Note
This parameter is available starting with V4.1.0.
Description
dump_data_dictionary_to_log_interval specifies the interval for persisting the data dictionary of a tenant.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
Notice
When you upgrade an earlier version to V4.2.5 BP1, the value of this parameter remains unchanged.
| Attribute | Description |
|---|---|
| Type | Time |
| Default value | 0, in seconds
NoteStarting from V4.2.5 BP1, the default value of this parameter is changed from 24H to 0. If the value is 0, the data dictionary is not generated based on this parameter. To stop generating the data dictionary, you must execute the |
| Value range | [0s, +∞)
NoteStarting from V4.2.5 BP1, the value range of this parameter is changed from (0s, +∞) to [0s, +∞). |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The data dictionary is used only for user tenants. It is persisted in the system log stream (SYS_LS) of a user tenant by using the PALF mechanism. After a user tenant is created, the data dictionary service is automatically started and runs on the leader replica of the SYS_LS log stream of the tenant.
When the log archiving service is enabled, an asynchronous data dictionary generation task is automatically triggered. OceanBase Database supports scheduling the periodic generation of the data dictionary by using the tenant-level parameter dump_data_dictionary_to_log_interval and the DBMS_DATA_DICT package (available starting from V4.2.5 BP1). We recommend that you use the DBMS_DATA_DICT package to schedule the generation of the data dictionary.
OceanBase Database supports recording the generation records of the data dictionary by using DBA/CDB views starting from V4.2.0. You can query the CDB_OB_DATA_DICTIONARY_IN_LOG view in the sys tenant or the DBA_OB_DATA_DICTIONARY_IN_LOG view in a user tenant to obtain the dictionary location information.
Examples
Set the interval for persisting the data dictionary of a tenant to 24H.
obclient> ALTER SYSTEM SET dump_data_dictionary_to_log_interval = '24H';
References
- For more information about log archiving, see Log archiving.