The SA_SYSDBA.ALTER_POLICY procedure is used to set and modify the column names associated with a policy.
Policies can only be used to change the column names of policies that are not applied to any user table or schema. Otherwise, an error will be returned:
12474, 00000, "cannot change column name for a policy in use"
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Syntax
SA_SYSDBA.ALTER_POLICY (
policy_name IN VARCHAR,
default_options IN VARCHAR := NULL,
);
Parameters
| Parameter | Description |
|---|---|
| policy_name | The name of the policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES view. |
| default_options | The default enforcement options. When a policy is applied but no specific table or schema is specified, the default enforcement options (including enforcement options and hidden tag column options) are used. Separate each option with a comma. |
Examples
The following example updates the shield_agent_policy policy to use a different set of default options.
BEGIN
SA_SYSDBA.ALTER_POLICY (
policy_name => 'shield_agent_policy',
default_options => 'read_control, write_control');
END;
/