The SA_SESSION.SET_LABEL procedure sets the label of the current database session.
You can set the session label to any level that is greater than or equal to the minimum value and less than or equal to the maximum value.
Note that changing the session label may affect the row label value of the session. The row label of the session may not be the same as the session label.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
SA_SESSION.SET_LABEL (
policy_name IN VARCHAR,
label IN VARCHAR);
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. |
| label | The value to set as the label. |
Examples
The following example sets the label for the shield_agent_policy policy.
BEGIN
SA_SESSION.SET_LABEL (
policy_name => 'shield_agent_policy',
label => 'L6');
END;
/
