The SA_POLICY_ADMIN.REMOVE_TABLE_POLICY procedure is used to remove a specified policy from a table.
The policy predicate and all DML triggers will be removed from the table, and the policy's column can be optionally dropped. Policies can be removed from tables within the schema they protect.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
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 name of the policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view. |
| schema_name | The schema containing the table associated with the policy. To find this schema, query the SCHEMA_NAME column of the ALL_SA_TABLE_POLICIES view. |
| table_name | The table in the schema_name database. To find this table, query the TABLE_NAME column of the ALL_SA_TABLE_POLICIES view. |
| drop_column | Whether to drop the column. If TRUE, the column associated with the policy will be removed from the table; otherwise, it will be retained. |
Examples
The following example removes the shield_agent_policy 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;
/
