This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- On the database, enable auditing: | |
ALTER SYSTEM ALTER CONFIGURATION ('nameserver.ini', 'SYSTEM') | |
set ( | |
'auditing configuration', | |
'global_auditing_state' | |
) = 'true' with reconfigure; | |
-- All audit logs should be directed to a database table called audit log in our scenario: | |
ALTER SYSTEM ALTER CONFIGURATION ('nameserver.ini', 'SYSTEM') | |
set ( | |
'auditing configuration', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Please enable the auditing on database as documented in https://gist.github.com/shaheerxt/2ceda6c2d49e1fd33187428ff9da5a0b | |
-- Setup Policy as SYSTEM user (On the database - SYSTEMDB or TENANT DB): | |
CREATE AUDIT POLICY "AUDIT-USER_CONNECT_FAILURES" AUDITING UNSUCCESSFUL CONNECT LEVEL INFO; | |
-- Query to check if there are failures: | |
select * | |
from audit_log | |
where audit_policy_name = 'AUDIT-USER_CONNECT_FAILURES' | |
order by timestamp desc | |
limit 100; | |
-- You may want to check minutes aggregation if you have an application that often makes unsuccessful connections the database. |
OlderNewer