The ENABLE_POLICY procedure is used to enable or disable a security policy on a specified table or view.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support it.
Syntax
DBMS_RLS.ENABLE_POLICY(
object_schema IN VARCHAR2 := NULL,
object_name IN VARCHAR2,
policy_name IN VARCHAR2,
enable IN BOOLEAN := TRUE);
Parameters
Parameter |
Description |
|---|---|
| object_schema | The name of the schema to which the table or view belongs. Default isNULL, indicating the current schema. |
| object_name | The name of the table or view. |
| policy_name | The name of the policy. |
| enable | Set toTRUEEnable the policy,FALSEDisabled policy. Default isTRUE. |
Examples
-- Enabled Policy
BEGIN
DBMS_RLS.ENABLE_POLICY(
object_schema => 'hr',
object_name => 'employees',
policy_name => 'emp_policy',
enable => TRUE);
END;
/
