In today’s article, we will be learning how to list Users Gaining Unauthorized Access to Oracle Database.
We can list users who have entered an incorrect password on Oracle Database or want to log in to a locked account with the help of the code block below.
1 2 3 4 5 6 7 8 9 10 11 12 | SELECT username AS "DB USER", os_username AS "OS USER", userhost AS "HOSTNAME", TO_CHAR (timestamp, 'DD/MM/YY HH24:MI:SS')"TIMESTAMP", DECODE ( returncode, 01017, 'WRONG USER OR PASSWORD', 28000, 'LOCKED ACCOUNT TRIAL') AS return code FROM SYS.DBA_AUDIT_SESSION WHERE returncode != 0 AND returncode IN (1017, 28000) ORDER BY extended_timestamp DESC |