The SA_LABEL_ADMIN.ALTER_LABEL procedure is used to change the string label associated with a label tag. The label itself cannot be changed.
If the string associated with a label tag is changed, the sensitivity of the data in the row will also change accordingly. Make sure that you can reference the label by its label tag or string value when specifying the label to change.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
SA_LABEL_ADMIN.ALTER_LABEL (
policy_name IN VARCHAR,
label_tag IN BINARY_INTEGER,
new_label_value IN VARCHAR := NULL,
new_data_label IN BOOLEAN := NULL );
Parameters
| Parameter | Description |
|---|---|
| policy_name | The name of the existing policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES view. |
| label_tag | The integer tag assigned to the label to be changed. To find existing labels, query the LABEL_TAG column of the ALL_SA_LABELS view. |
| new_label_value | The new string representation of the label value. If NULL, the existing value remains unchanged. |
| new_data_label | TRUE if the label can be used to tag row data. If NULL, the existing value remains unchanged. |
Examples
The following example changes the label_tag and label_value for the shield_agent_policy policy.
BEGIN
SA_LABEL_ADMIN.ALTER_LABEL (
policy_name => 'shield_agent_policy',
label_tag => 60000,
new_label_value => 'L6',
new_data_label => TRUE);
END;
/
