Tuesday, March 17, 2009

Report for failed logins from DBA_AUDIT_SESSION

select to_char(timestamp,'DD-MON-YYYY')||' '||username||' '||os_username||'@'||terminal||' '||count(*)
from dba_audit_session
where returncode<>0 and terminal is not null
group by username,os_username,terminal,to_char(timestamp,'DD-MON-YYYY');