Audit user logon operations

2023-10-31 11:17:10  Updated

This topic describes how to use the security audit feature to audit user logon operations.

Limitations

Currently, only the Oracle mode of OceanBase Database supports the security audit feature.

Audit the logon operations of a specific user

Log on to the database as the ORAAUDITOR user and audit the logon operations of user1.

obclient> AUDIT SESSION BY user1;

Audit the logon operations of all users

Log on to the database as the ORAAUDITOR user and audit the logon operations of all users.

obclient> AUDIT SESSION;

View audit records

View the audit records in the DBA_AUDIT_TRAIL view.

obclient> SELECT USERNAME,USERHOST,TIMESTAMP,SQL_TEXT FROM SYS.DBA_AUDIT_TRAIL;
+----------+----------------+-----------+----------+
| USERNAME | USERHOST       | TIMESTAMP | SQL_TEXT |
+----------+----------------+-----------+----------+
| USER1    | 10.10.10.10    | 22-DEC-21 | CONNECT  |
+----------+----------------+-----------+----------+
1 row in set

References

For more information about audit operations, see the following topics:

Contact Us