Purpose
Log archive mode is divided into archive mode (ARCHIVELOG) and non-archive mode (NOARCHIVELOG). After enabling the log archive mode, you can use the ALTER SYSTEM NOARCHIVELOG statement to disable the archive mode for a user tenant.
Limitations and considerations
Before you use the ALTER SYSTEM NOARCHIVELOG statement to disable the archive mode, if there are ongoing or paused log archive tasks in the current tenant, the system will automatically stop these archive tasks after the archive mode is disabled.
Privilege requirements
The sys tenant's root user (root@sys) or the administrator user of each tenant must execute this operation. Specifically:
- The default administrator user in MySQL mode is
root. - The default administrator user in Oracle mode is
SYS.
Syntax
ALTER SYSTEM NOARCHIVELOG [TENANT = {all | tenant_name[, tenant_name...]}] [DESCRIPTION [=] 'description'];
Parameters
| Parameter | Description |
|---|---|
| all | Disables the archive mode for all user tenants in the cluster. |
| tenant_name[, tenant_name...] | Specifies the name of the tenant to disable the archive mode for. You can specify multiple tenants, separated by commas (,).
NoticeOnly the system tenant needs to specify the |
| description | Optional. Specifies a description for this operation. |
Examples
Assume that the current cluster has three tenants: sys, mysql_tenant, and oracle_tenant, and both mysql_tenant and oracle_tenant have enabled the archive mode. You can use the following statements to disable the archive mode for the tenants.
The system tenant disables the archive mode for the
mysql_tenanttenant.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = mysql_tenant;The system tenant disables the archive mode for the
mysql_tenantandoracle_tenanttenants.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = mysql_tenant, oracle_tenant;The system tenant disables the archive mode for all user tenants.
obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = all;The
mysql_tenantandoracle_tenantuser tenants disable the archive mode for themselves.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG;
