Purpose
You can use the SET LOG_ARCHIVE_DEST_STATE statement to set the status of the archive destination for a tenant.
Required privileges
You must execute this statement as the root user of the sys tenant (namely root@sys) or as the administrator of a user tenant.
- The default administrator is the
rootuser in MySQL mode. - The default administrator is the
SYSuser in Oracle mode.
Syntax
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE={'ENABLE' | 'DEFER'} [TENANT = tenant_name];
Parameters
| Parameter | Description |
|---|---|
| 'ENABLE' | 'DEFER' | The status of the archive destination. Valid values:
|
| tenant_name | The name of the tenant for which the status of the archive destination is to be set. You can execute this statement to set the status of the archive destination for only one tenant at a time.
NoticeYou must use the |
Examples
Assume that an archive destination has been configured for the mysql_tenant tenant.
Suspend log archiving in the archive destination of the
mysql_tenanttenant from the sys tenant.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'DEFER' TENANT = mysql_tenant;Enable log archiving in the archive destination of the
mysql_tenanttenant from the current tenant.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'ENABLE';