Note
This view is available starting with V2.2.30.
Purpose
This view records the default audit rules for any object. The values of each column are as follows:
-/-: Default is not audited.A/-: Audited only when the statement is executed successfully.-/A: Audited only when the statement is executed unsuccessfully.A/A: Audited when the statement is executed successfully or unsuccessfully.Applicability
This view is applicable only to OceanBase Database in Oracle-compatible mode.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| ALT | VARCHAR2(3) | NO | ALTER operation |
| AUD | VARCHAR2(3) | NO | AUDIT operation |
| COM | VARCHAR2(3) | NO | COMMENT operation |
| DEL | VARCHAR2(3) | NO | DELETE operation |
| GRA | VARCHAR2(3) | NO | GRANT operation |
| IND | VARCHAR2(3) | NO | INDEX operation |
| INS | VARCHAR2(3) | NO | INSERT operation |
| LOC | VARCHAR2(3) | NO | LOCK operation |
| REN | VARCHAR2(3) | NO | RENAME operation |
| SEL | VARCHAR2(3) | NO | SELECT operation |
| UPD | VARCHAR2(3) | NO | UPDATE operation |
| REF | VARCHAR2(3) | NO | REFERENCE operation. Currently, this operation is defined but not supported. The default value is NULL. |
| EXE | VARCHAR2(3) | NO | EXECUTE operation |
| FBK | VARCHAR2(3) | NO | FLASHBACK operation |
| REA | VARCHAR2(3) | NO | READ operation |
Sample query
Query the default audit rules for any object.
obclient [SYS]> SELECT * FROM SYS.ALL_DEF_AUDIT_OPTS;
The query result is as follows:
+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
| ALT | AUD | COM | DEL | GRA | IND | INS | LOC | REN | SEL | UPD | REF | EXE | FBK | REA |
+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
| -/- | -/- | -/- | A/A | -/- | -/- | A/A | -/- | -/- | -/- | A/A | -/- | -/- | -/- | -/- |
+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
1 row in set
References
View the detailed configuration of object-level audit: DBA_OBJ_AUDIT_OPTS
View the detailed configuration of statement-level audit: DBA_STMT_AUDIT_OPTS
For more information about how to enable audit and set audit rules, see the following topics: