Purpose
OceanBase Database supports archive (ARCHIVELOG) and non-archive (NOARCHIVELOG) modes for log archiving. You can use this statement to disable the archive mode for a user tenant.
Limitations and considerations
After you disable the archive mode for a tenant, the system automatically stops the ongoing and suspended archive jobs of the tenant.
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 NOARCHIVELOG [TENANT = {all | tenant_name[, tenant_name...]}] [DESCRIPTION [=] 'description'];
Parameters
| Parameter | Description |
|---|---|
| all | Specifies to disable the archive mode for all user tenants in a cluster from the sys tenant. |
| tenant_name[, tenant_name…] | The names of the tenants for which you want to disable the archive mode from the sys tenant. You can specify multiple tenants at a time. Tenant names must be separated with commas (,).
NoticeWhen you execute this statement in the |
| description | The description of the operation. This parameter is optional. |
Examples
Assume that the current cluster contains three tenants: sys, mysql_tenant, and oracle_tenant, and that the archive mode has been enabled for the mysql_tenant and oracle_tenant tenants.
In the
systenant, disable the archive mode for themysql_tenanttenant.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = mysql_tenant;In the
systenant, disable the archive mode for themysql_tenantandoracle_tenanttenants.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = mysql_tenant, oracle_tenant;In the
systenant, disable the archive mode for all user tenants.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = all;In the
mysql_tenantororacle_tenanttenant, disable the archive mode for the current tenant.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG;