In Oracle-compatible mode, you can use the AUDIT and NOAUDIT statements to configure statement-level and object-level audit rules. Audit log encryption is not configured by DDL statements. Instead, it is implemented together with the audit_log_encryption parameter and the audit functions described in this topic. These functions have the same semantics as those in MySQL-compatible mode. In Oracle-compatible mode, we recommend that you call them with FROM DUAL.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the audit feature.
Audit functions
The following table describes the audit functions supported by the current version of OceanBase Database in Oracle-compatible mode.
Function name |
Description |
|---|---|
| AUDIT_LOG_ENCRYPTION_PASSWORD_SET | Triggers archiving of the audit log that is currently being written and generates a new encryption key. This function is supported starting from V4.6.1. |
| AUDIT_LOG_ENCRYPTION_PASSWORD_GET | Returns the encryption password, or key material, for the corresponding archived audit log file based on the pwd_id in the archived file name. This function is supported starting from V4.6.1. |
Limitations and considerations
The functions must be used directly and exclusively as output columns, that is, select items, in a
SELECTstatement. They cannot be nested in parent expressions.The functions cannot be used in subqueries.
You must have the
SUPERprivilege to use these functions.
