init.ora 파라미터에서 audit_trail='DB'로 되어 있고, 디비내에서 audit session이 명령이 수행돠어 있으면, dba_audit_session 뷰에서 확인 할 수 있습니다.
select os_username, userhost, terminal, to_char(timestamp, 'YYYY/MM/DD HH24:MI:SS') date_time, returncode
from dba_audit_session
where action_name = 'LOGON'
and returncode in (1017, 28000)
and timestamp > trunc(sysdate) -- 예를들어, account lock 이 오늘 일어 났을 경우
and username = '디비계정'
order by date_time desc;
여기서, returncode 1017은 ORA-01017 (invalid username/password ... ) 예 해당하고 28000은 ORA-28000 (the account is locked)에 해당합니다.
따라서, returncode 0 (logon success)를 포함시켜 return code들을 시간역순으로 나열시키면, 예를들어, 다음과 같은 패턴이 보이게 됩니다.
28000
28000
28000
1017
1017
1017
1017
1017
0
1017
0
0
0
0