The SA_USER_ADMIN.SET_LEVELS procedure is used to assign the minimum and maximum levels for a user and to specify the default session tag and row tag values for the user.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
SA_USER_ADMIN.SET_LEVELS (
policy_name IN VARCHAR,
user_name IN VARCHAR,
max_level IN VARCHAR,
min_level IN VARCHAR := NULL,
def_level IN VARCHAR := NULL,
row_level IN VARCHAR := NULL);
Parameters
| Parameter | Description |
|---|---|
| policy_name | The name of the policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view. |
| user_name | The username. This user does not need any label security privileges to run this procedure. |
| max_level | The highest level for read and write access, represented by the short name. To find existing levels, query the SHORT_NAME column of the ALL_SA_LEVELS view. |
| min_level | The lowest level for write access, represented by the short name. If set to NULL, the default value is the lowest level of the policy. |
| def_level | The default level (equal to or greater than the minimum level and equal to or less than the maximum level). Represented by the short name. If set to NULL, the default value is max_level. |
| row_level | The row level (equal to or greater than the minimum level and less than or equal to the default level). Represented by the short name. If set to NULL, it will be set to def_level. |
Examples
The following example sets the levels for the shield_agent_policy policy.
BEGIN
SA_USER_ADMIN.SET_LEVELS (
policy_name => 'shield_agent_policy',
user_name => 'COULSON',
max_level => 'L8',
min_level => 'L5',
def_level => 'L8',
row_level => 'L8');
END;
/
