Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The oceanbase.CDB_OB_SYS_VARIABLES view displays information about the system variables of all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CREATE_TIME | timestamp(6) | NO | The time when the system variable was created. |
| MODIFY_TIME | timestamp(6) | NO | The time when the system variable was modified. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| NAME | varchar(128) | NO | The name of the system variable. |
| VALUE | varchar(65536) | YES | The value of the system variable. |
| MIN_VALUE | varchar(65536) | NO | The minimum value of the system variable. |
| MAX_VALUE | varchar(65536) | NO | The maximum value of the system variable. |
| SCOPE | varchar(16) | NO | The scope where the variable takes effect. Valid values:GLOBAL_ONLY: The variable takes effect at the tenant level.SESSION_ONLY: The variable takes effect at the session level.GLOBAL | SESSION: The variable takes effect at the tenant or session level. |
| INFO | varchar(4096) | NO | The description of the variable. |
| DEFAULT_VALUE | varchar(65536) | YES | The default value of the system variable.
Note
|
| ISDEFAULT | varchar(3) | NO | Indicates whether the current value is the default value.
Note
|
Sample query
Query information about the system variables of all tenants.
obclient > select * from oceanbase.CDB_OB_SYS_VARIABLES limit 1 \G
The query result is as follows:
*************************** 1. row ***************************
CREATE_TIME: 2024-05-08 14:20:28.885780
MODIFY_TIME: 2024-05-08 14:20:28.885780
TENANT_ID: 1
NAME: activate_all_roles_on_login
VALUE: 0
MIN_VALUE:
MAX_VALUE:
SCOPE: GLOBAL_ONLY
INFO: whether to enable automatic activation of all granted roles when users log in to the server
DEFAULT_VALUE: 0
ISDEFAULT: YES
1 row in set (0.021 sec)