SA_SESSION.SET_ROW_LABEL is used to set the default row label value for the current database session.
When the LABEL_DEFAULT option is set, if no label is explicitly specified by the user, this row label value will be used during insertions.
If the default row label value is not set using SA_SESSION.SET_ROW_LABEL, it will automatically be derived from the session label. It includes the level of the session label.
If the session label changes, the row label will automatically reset. For example, if the session level is changed from HIGHLY_SENSITIVE to SENSITIVE, the level component of the row label will automatically change to SENSITIVE.
Users can independently set row labels, but they must be less than or equal to the session label level and greater than or equal to their minimum level.
If a user attempts to set a row label to an invalid value, the operation is disallowed, and the row label value remains unchanged.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
SA_SESSION.SET_ROW_LABEL (
policy_name IN VARCHAR,
row_label IN VARCHAR);
Parameters
| Parameter | Description |
|---|---|
| policy_name | Specifies the policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view. |
| row_label | The value to set as the default row label. |
Examples
The following example sets the row label for the shield_agent_policy policy.
BEGIN
SA_SESSION.SET_ROW_LABEL (
policy_name => 'shield_agent_policy',
row_label => 'L5');
END;
/
