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!

How to track Account Lock

BipulJan 18 2010 — edited Jan 31 2010
We have mechanism to lock the ID after 10 consecutive wrong attempts.
I want to implement a script which will find out which user did this.
I want to find out the record for returncode = 1017 rows right before the id locked (Returncode=28000)
how can I get that ... can anyone help ?

Data dictionary view DBA_AUDIT_SESSION keeps track of the Account Lock event.
Returncode : 
ORA-01017: invalid username/password; logon denied
and
ORA-28000: the account is locked
I was trying something like this ...
select OS_USERNAME, USERNAME , USERHOST, RETURNCODE, TIMESTAMP
from dba_audit_session
where to_date(TIMESTAMP, 'DD-Mon-YY') in (select to_date(TIMESTAMP, 'DD-Mon-YY')
from dba_audit_session
where to_date(TIMESTAMP,'DD-Mon-YY') = to_date(sysdate, 'DD-Mon-YY'))
and RETURNCODE = 28000;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 28 2010
Added on Jan 18 2010
5 comments
49,022 views