The auditing feature can be used to audit user login operations.
Audit login of a specific user
Log in as the ORAAUDITOR user and enable auditing for logins by user1.
obclient> AUDIT SESSION BY user1;
Audit logins of all users
Log in as the ORAAUDITOR user and enable auditing for logins by all users.
obclient> AUDIT SESSION;
View auditing records
Query auditing 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 security auditing, see: