Enables policy-specific auditing. Audit records capture Oracle OLS administrative actions and the use of Oracle Label Security privileges
that were used during logons, DML executions, and trusted stored procedure invocations
sa_audit_admin.audit(
policy_name IN VARCHAR2,
users IN VARCHAR2 DEFAULT NULL,
audit_option IN VARCHAR2 DEFAULT NULL,
audit_type IN VARCHAR2 DEFAULT NULL, -- options 'BY ACCESS' or 'BY SESSION'
success IN VARCHAR2 DEFAULT NULL); -- options 'SUCCESSFUL' or 'NOT SUCCESSFUL'
Audit Options
Option
Description
APPLY
Audits application of specified Oracle Label Security policies to tables and schemas
PRIVILEGES
Audits use of all policy-specific privileges
REMOVE
Audits removal of specified Oracle Label Security policies from tables and schemas
SET
Audits the setting of user authorizations, and user and program privileges
Returns a flag indicating whether labels are being recorded in audit records for the policy
sa_audit_admin.audit_label_enabled(policy_name IN VARCHAR2) RETURN BOOLEAN;
BEGIN
IF sa_audit_admin.audit_label_enabled('DATA_ACCESS') THEN
dbms_output.put_line('T');
ELSE
dbms_output.put_line('F');
END IF;
END;
/
*
ORA-12458: Oracle Label Security not enabled
Undocumented but identical in function to AUDIT_LABEL_ENABLED, above,
except that it returns an integer value and the function can be incorporated into SQL statements
sa_audit_admin.audit_label_enabled_sql(policy_name IN VARCHAR2)
RETURN BINARY_INTEGER;
SELECT sa_audit_admin.audit_label_enabled_sql('DATA_ACCESS');
*
ORA-12458: Oracle Label Security not enabled