SA_LABEL_ADMIN.DROP_LABEL

2023-07-28 02:55:43  Updated

The SA_LABEL_ADMIN.DROP_LABEL procedure drops the specified policy label.

An "Invalid Label" error will be reported if the label is subsequently referenced in data rows, user labels, or program unit labels after it is dropped.

Use this procedure only when setting labels. If you accidentally delete a label that is in use, you can restore the label by disabling and then re-enabling the policy.

Applicability

This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.

Syntax

SA_LABEL_ADMIN.DROP_LABEL (
policy_name       IN VARCHAR,
label_tag         IN BINARY_INTEGER);

Parameters

Parameter Description
policy_name The name of an existing policy. You can query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view for existing policies.
label_tag The integer tag assigned to the to-be-dropped label. You can query the LABEL_TAG column of the ALL_SA_LABELS view for existing labels.

Notice

Do not drop labels that are being used by the database.

Examples

The following example drops the shield_agent_policy policy label based on its label_tag:

BEGIN
   SA_LABEL_ADMIN.DROP_LABEL (
     policy_name     => 'shield_agent_policy',
     label_tag       => 50000);
END;
/

Contact Us