how to retrieve user logging 120 days ago [message #686493] |
Tue, 27 September 2022 09:17 |
evoradba
Messages: 144 Registered: April 2005 Location: Canada
|
Senior Member |
|
|
Hello
how do I see oracle 12c user activity 120 days ago? im looking for a select statment showing users login to the database more then 120 days ago, is this possible?
SELECT c.username,
a.SAMPLE_TIME,
a.SQL_EXEC_START,
b.SQL_TEXT
FROM DBA_HIST_ACTIVE_SESS_HISTORY a, dba_hist_sqltext b, dba_users c
WHERE a.SQL_ID = b.SQL_ID(+)
AND a.user_id = c.user_id
AND c.username = 'USERNAME'
ORDER BY a.SQL_EXEC_START ASC
|
|
|
|