Note
This view is introduced since OceanBase Database V4.2.2.
Purpose
The oceanbase.DBA_OB_SYS_VARIABLES view displays the settings of system variables of the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CREATE_TIME | timestamp(6) | Yes | The time when the system variable was created. |
| MODIFY_TIME | timestamp(6) | Yes | The time when the system variable was modified. |
| NAME | varchar(128) | No | The name of the system variable. |
| VALUE | varchar(65536) | Yes | The current 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 level of the system variable. |
| INFO | varchar(4096) | No | The description about the system variable. |
| DEFAULT_VALUE | varchar(65536) | Yes | The default value of the system variable. |
| ISDEFAULT | varchar(3) | No | Indicates whether the default value is used. |
Example
obclient > select * from oceanbase.DBA_OB_SYS_VARIABLES limit 2;
The query result is as follows:
+----------------------------+----------------------------+-------------------------+-------+-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------+---------------+-----------+
| CREATE_TIME | MODIFY_TIME | NAME | VALUE | MIN_VALUE | MAX_VALUE | SCOPE | INFO | DEFAULT_VALUE | ISDEFAULT |
+----------------------------+----------------------------+-------------------------+-------+-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------+---------------+-----------+
| 2023-12-08 13:58:56.520931 | 2023-12-08 13:58:56.520931 | autocommit | 1 | | | GLOBAL | SESSION | | 1 | YES |
| 2023-12-08 13:58:56.520931 | 2023-12-08 13:58:56.520931 | automatic_sp_privileges | 1 | | | GLOBAL_ONLY | The server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine | 1 | YES |
+----------------------------+----------------------------+-------------------------+-------+-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------+---------------+-----------+
2 rows in set (0.001 sec)