Description
The SET LOG_ARCHIVE_DEST_STATE statement is used to set the state of the archive destination.
Privilege requirements
This statement must be executed by the root user of the sys tenant (root@sys) or the administrator user of a user tenant (root user).
Syntax
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE={'ENABLE' | 'DEFER'} [TENANT = tenant_name];
Parameters
Parameter |
Description |
|---|---|
| 'ENABLE' \ | 'DEFER' | Specifies the status of the destination archive:
|
| tenant_name | The system tenant specifies the tenant name for which the archive destination status is to be set. Each statement only supports setting the archive destination for one tenant.
NoticeOnly the system tenant needs to specify the target tenant via the |
Examples
Assume the tenant mysql_tenant has completed the configuration of the archiving destination. Example:
The system tenant suspends log archiving for the
mysql_tenanton the destination.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'DEFER' TENANT = mysql_tenant;The tenant
mysql_tenantinitiates log archiving for itself at the destination.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'ENABLE';