Purpose
The SET LOG_ARCHIVE_DEST_STATE statement is used to set the status 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 each tenant. Specifically:
- The default administrator user in MySQL mode is the
rootuser. - The default administrator user in Oracle 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 archive destination:
|
| tenant_name | Specifies the tenant name for which the archive destination status is to be set. Each statement can only set the archive destination status for one tenant.
NoticeOnly the system tenant needs to specify the target tenant using the |
Examples
Assume that the archive destination has been configured for the mysql_tenant tenant. Here are some examples:
The system tenant pauses log archiving for the
mysql_tenanttenant at the archive destination.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'DEFER' TENANT = mysql_tenant;The
mysql_tenanttenant starts log archiving at the archive destination.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'ENABLE';
