Purpose
Two log archiving modes are supported: ARCHIVELOG and NOARCHIVELOG. You can use the ALTER SYSTEM NOARCHIVELOG statement to disable ARCHIVELOG for a user tenant.
Limitations and considerations
If ongoing or paused log archiving jobs exist in the current tenant before you execute the ALTER SYSTEM NOARCHIVELOG statement to disable ARCHIVELOG for the tenant, the system automatically stops the archiving jobs after you disable ARCHIVELOG.
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 NOARCHIVELOG [TENANT = {all | tenant_name[, tenant_name...]}] [DESCRIPTION [=] 'description'];
Parameters
| Parameter | Description |
|---|---|
| all | Specifies to disable ARCHIVELOG for all user tenants in the current cluster from the sys tenant. |
| tenant_name[, tenant_name...] | The name of the tenant for which ARCHIVELOG is to be disabled from the sys tenant. You can specify multiple tenants separated with commas (,).
NoticeYou must use the |
| description | Optional. The description of the operation. |
Examples
Assume that the current cluster contains three tenants which are respectively named sys, mysql_tenant, and oracle_tenant, and that ARCHIVELOG has been enabled for the mysql_tenant and oracle_tenant user tenants. You can execute the following statement to disable ARCHIVELOG for the tenants.
Disable ARCHIVELOG for the
mysql_tenanttenant from the sys tenant.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = mysql_tenant;Disable ARCHIVELOG for the
mysql_tenantandoracle_tenanttenants from the sys tenant.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = mysql_tenant, oracle_tenant;Disable ARCHIVELOG for all user tenants from the sys tenant.
obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG TENANT = all;Disable ARCHIVELOG for the
mysql_tenantororacle_tenanttenant from the current tenant.obclient [oceanbase]> ALTER SYSTEM NOARCHIVELOG;