SA_COMPONENTS.ALTER_LEVEL is used to change the short name and long name of a level.
Once a level number is defined, it cannot be changed. If a level is used in any existing tags, its short name cannot be changed, but its long name can be changed.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Syntax
SA_COMPONENTS.ALTER_LEVEL (
policy_name IN VARCHAR,
level_num IN NUMBER,
new_short_name IN VARCHAR := NULL,
new_long_name IN VARCHAR := NULL
);
Parameters
| Parameter | Description |
|---|---|
| policy_name | Specifies the policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES view. |
| level_num | Specifies the number of the level to change. To find existing levels, query the LEVEL_NUM column of the ALL_SA_LEVELS view. |
| new_short_name | Specifies the new short name of the level (up to 30 characters) |
| new_long_name | Specifies the new long name of the level (up to 80 characters) |
Examples
The following example changes the long name and short name of the shield_agent_policy level.
BEGIN
SA_COMPONENTS.ALTER_LEVEL (
policy_name => 'shield_agent_policy',
level_num => 500,
new_short_name => 'M5',
new_long_name => 'MEDIUM_SECRET 5');
END;
/