The DBMS_AUDIT_MGMT package is used to manage audit trail records. The subprograms provided by the DBMS_AUDIT_MGMT package can assist audit administrators in managing audit logs.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Privilege requirements for DBMS_AUDIT_MGMT
All subprograms in the DBMS_AUDIT_MGMT package require the EXECUTE privilege. By default, the SYSDBA role has the EXECUTE privilege on this package.
Audit trail types in DBMS_AUDIT_MGMT
| Constant | Data type | Description |
|---|---|---|
| AUDIT_TRAIL_ALL | PLS_INTEGER | All audit trail types. This includes standard database audit trails and operating system (OS) audit trails. |
| AUDIT_TRAIL_AUD_STD | PLS_INTEGER | Standard audit. |
| AUDIT_TRAIL_DB_STD | PLS_INTEGER | Standard audit. |
| AUDIT_TRAIL_FILES | PLS_INTEGER | Operating system (OS) audit trails. |
| AUDIT_TRAIL_OS | PLS_INTEGER | Operating system audit trails, which store audit records in OS files. |
Overview of DBMS_AUDIT_MGMT subprograms
The following table lists the DBMS_AUDIT_MGMT subprograms supported in the current version of OceanBase Database and their brief descriptions.
| Subprogram | Description |
|---|---|
| CLEAN_AUDIT_TRAIL | Deletes archived audit trail records or files. |
| CREATE_PURGE_JOB | Creates a purge job to periodically delete audit trail records or files. |
| DROP_PURGE_JOB | Drops a purge job created by using the CREATE_PURGE_JOB procedure. |
| SET_LAST_ARCHIVE_TIMESTAMP | Sets a timestamp indicating the last time audit records or files were archived. |
| SET_PURGE_JOB_STATUS | Enables or disables the specified purge job. |
