Purpose
The SET LOG_ARCHIVE_DEST_STATE statement is used to set the state of the archive destination.
Privilege requirements
It must be executed by the root user of the sys tenant (root@sys) or the administrator user of each tenant. Specifically:
- The default administrator user in MySQL-compatible mode is the
rootuser. - The default administrator user in Oracle-compatible mode is the
SYSuser.
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 that the tenant mysql_tenant has completed the configuration of the archiving destination. Example:
The system tenant pauses 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';
