The SA_LABEL_ADMIN.DROP_LABEL procedure is used to delete a specified policy label.
Any subsequent references to the label (in data rows, or in user or program unit labels) will result in an invalid label error.
This stored procedure is used when setting up labels. If an unintentional label deletion occurs, the label can be restored by disabling and then re-enabling the policy.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
SA_LABEL_ADMIN.DROP_LABEL (
policy_name IN VARCHAR,
label_tag IN BINARY_INTEGER);
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 deleted. To find existing labels, query the LABEL_TAG column of the ALL_SA_LABELS view. |
Notice
Do not delete labels that are in use in the database.
Examples
The following example demonstrates how to delete the shield_agent_policy policy label based on the label_tag.
BEGIN
SA_LABEL_ADMIN.DROP_LABEL (
policy_name => 'shield_agent_policy',
label_tag => 50000);
END;
/
