Note
This variable is available starting with V1.4.
Description
read_only specifies whether the tenant is in read-only mode.
Privilege requirements
Query variables
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to obtain the values of global system variables.Modify variables
The
systenant can modify the values of global system variables.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.An Oracle user tenant must have the
ALTER SYSTEMprivilege to modify the values of global system variables.
Attributes
| Attribute | Description |
|---|---|
| Type | Bool |
| Default value | OFF |
| Value range | ON: The tenant is in read-only mode.OFF: The tenant is in read/write mode. |
| Scope | Global |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage
After this variable is set, all normal users in the tenant are affected, but users with the root privilege are not.
Examples
Set the tenant to read/write mode.
obclient> SET GLOBAL read_only = OFF;