This topic describes how to use AuditTrail to audit the logon operations of users.
Audit the logon operations of a specified user
Log on to the database as the ORAAUDITOR user and specify to audit logon operations of the aud user.
obclient> AUDIT SESSION BY user1;
Audit the logon operations of all users
Log on to the database as the ORAAUDITOR user and specify to audit logon operations of all users.
obclient> AUDIT SESSION;
View audit records
View the audit records in the DBA_AUDIT_TRAIL table.
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