Skip to content

Instantly share code, notes, and snippets.

@caiogallo
Created July 31, 2015 19:39
Show Gist options
  • Save caiogallo/918fc569f86ddaa280e0 to your computer and use it in GitHub Desktop.
Save caiogallo/918fc569f86ddaa280e0 to your computer and use it in GitHub Desktop.
Select falhas tentativas login
SELECT username, count(1) falhas
FROM sys.dba_audit_session
WHERE returncode != 0
and trunc(timestamp) >= trunc(sysdate)
group by username
union
SELECT '>>TOTAL DE ERROS', count(1) falhas
FROM sys.dba_audit_session
WHERE returncode != 0
and trunc(timestamp) >= trunc(sysdate)
ORDER BY 2,1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment