SA_SYSDBA.ALTER_POLICY

2024-04-19 08:42:50  Updated

The SA_SYSDBA.ALTER_POLICY procedure sets and alters column names associated with the policy.

This procedure can alter column names of only policies that are not applied to user tables or schemas. Otherwise, the following error will be reported:

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 the MySQL mode.

Syntax

SA_SYSDBA.ALTER_POLICY (
      policy_name       IN  VARCHAR,
      default_options   IN  VARCHAR := NULL,
  );

Parameters

Parameter Description
policy_name The policy name. You can query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view for existing policies.
default_options The default enforcement options. If you apply a policy without specifying the table or schema to which the policy is applied, the default enforcement options are used. These options include the enforcement options and the option for hiding the label column. The options are separated by commas (,).

Examples

The following example updates shield_agent_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;
/

Contact Us