Note
This view is available starting with V2.2.30.
Purpose
This view records the detailed configurations for statement-level auditing.
Applicability
This view applies only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| USER_NAME | VARCHAR2(128) | NO | The username to be audited. |
| PROXY_NAME | VARCHAR2(128) | NO | The username of the audited Proxy user. The value of this field is always NULL. |
| AUDIT_OPTION | VARCHAR2(128) | NO | The Type ID of statement-level auditing. |
| SUCCESS | VARCHAR2(10) | NO | The auditing mode when the statement is executed successfully. |
| FAILURE | VARCHAR2(10) | NO | The auditing mode when the statement fails. |
Sample query
Query the detailed configuration of statement-level auditing.
obclient [SYS]> SELECT * FROM SYS.DBA_STMT_AUDIT_OPTS;
The query result is as follows:
+-----------+------------+----------------+-----------+-----------+
| USER_NAME | PROXY_NAME | AUDIT_OPTION | SUCCESS | FAILURE |
+-----------+------------+----------------+-----------+-----------+
| SYS | NULL | TABLE | BY ACCESS | NOT SET |
| SYS | NULL | ALL STATEMENTS | BY ACCESS | BY ACCESS |
| NULL | NULL | SESSION | BY ACCESS | BY ACCESS |
+-----------+------------+----------------+-----------+-----------+
3 rows in set
References
View the types of statement-level auditing options, their corresponding names, and their priorities: STMT_AUDIT_OPTION_MAP
View the detailed configuration of object-level auditing: DBA_OBJ_AUDIT_OPTS
View the audit rules that audit all objects by default: ALL_DEF_AUDIT_OPTS