Purpose
You can use the SET LOG_ARCHIVE_DEST_STATE statement to set the status of the archive destination.
Required privileges
Only the root user of the sys tenant (root@sys) or the administrator user of a user tenant can execute this statement.
- The default administrator user in MySQL mode is
root. - The default administrator user in Oracle mode is
SYS.
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 you want to set the status of the archive destination. This parameter is used in the sys tenant. You can set the status of the archive destination only for one tenant at a time.
NoticeWhen you execute this statement in the |
Examples
Assume that an archive destination has been configured for the mysql_tenant tenant.
In the
systenant, suspend log archiving at the destination for themysql_tenanttenant.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'DEFER' TENANT = mysql_tenant;In the
mysql_tenanttenant, start log archiving at the destination for the current tenant.obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE = 'ENABLE';