The SA_POLICY_ADMIN.REMOVE_TABLE_POLICY procedure removes the specified policy from a table.
It removes the policy predicate and all DML triggers from the table. You can specify the policy label column to be removed. It can remove policies from tables of a schema protected by this policy.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
Syntax
SA_POLICY_ADMIN.REMOVE_TABLE_POLICY (
policy_name IN VARCHAR,
schema_name IN VARCHAR,
table_name IN VARCHAR,
drop_column IN BOOLEAN := FALSE);
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. |
| schema_name | The schema containing the table associated with this policy. You can query the POLICY_NAME and SCHEMA_NAME columns of the ALL_SA_TABLE_POLICIES view for this schema. |
| table_name | The table in the schema named schema_name. You can query the POLICY_NAME, SCHEMA_NAME, and TABLE_NAME columns of the ALL_SA_TABLE_POLICIES view for this table. |
| drop_column | Indicates whether to drop the column. The column of this policy will be dropped from the table if the value is TRUE. Otherwise, the column of this policy is retained. |
Examples
The following example removes shield_agent_policy from the MISSION_LIST table in the FURY schema:
BEGIN
SA_POLICY_ADMIN.REMOVE_TABLE_POLICY(
policy_name => 'shield_agent_policy',
schema_name => 'FURY',
table_name => 'MISSION_LIST',
drop_column => TRUE);
END;
/