Overview
system_protected_sys_variables is used to configure the list of system variables that are locked. Ordinary users are not allowed to modify Global system variables in this list.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Only the
systenant can modify this parameter. User tenants cannot modify it.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | An empty string ("") indicates that no system variable is to be locked. |
| Value range | Up to 4 KB |
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
To prevent regular users from modifying global system variables, you can add the variable name to this parameter. After adding it, regular users (including those with Super privileges) will not be able to modify these system variables; only the ROOT user can do so.
Parameter value description:
Parameters are separated by commas. System variables are case-insensitive. No spaces are allowed before or after a comma, and a parameter must not start or end with a comma. The format is
"param1"or"param1,...,paran".Example configuration:
"param1""param1,param2""param1,param2,param3"
Invalid configuration example:
",""param1,""param1, param2"(a space follows the comma)"param1,param2,"
Configuration example
Lock the ob_enable_sql_audit system variable to prevent ordinary users from modifying it.
obclient> ALTER SYSTEM SET system_protected_sys_variables = "ob_enable_sql_audit";
Lock the system variables ob_enable_sql_audit and ob_sql_audit_percentage.
obclient> ALTER SYSTEM SET system_protected_sys_variables = "ob_enable_sql_audit,ob_sql_audit_percentage";