Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

lock inactive user accounts

446441Mar 22 2007 — edited Mar 29 2007
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2007
Added on Mar 22 2007
12 comments
4,357 views