lock inactive user accounts
446441Mar 22 2007 — edited Mar 29 2007I would like to check for users whos accounts have been inactive for say 30 days, then automatically expire their password, then for those whos accounts are still inactive after 90 days lock the expired user accounts (minus necessary oracle accounts)
We have auditing turned on so I know I can get the records.
I have a query, but the date is not showing > sysdate -30. It's showing within the past week.
select username,timestamp from dba_audit_session
where action_name='LOGON'
and to_char(timestamp,'MM/DD/YYYY') > to_char(sysdate-30,'MM/DD/YYYY')
This is just to find the records. It is returning records from the past few days.
Any help on this would be greatly appreciated.
Thank you