Skip to content

Instantly share code, notes, and snippets.

@r1d3rzz
Created September 26, 2024 03:46
Show Gist options
  • Save r1d3rzz/895f9ae551c4e809a8a17455d5d8dbf5 to your computer and use it in GitHub Desktop.
Save r1d3rzz/895f9ae551c4e809a8a17455d5d8dbf5 to your computer and use it in GitHub Desktop.
fix audit log in ssms
SELECT DATEADD(MINUTE, DATEDIFF(MINUTE, GETUTCDATE(), CURRENT_TIMESTAMP), event_time) AS event_time_afterconvert,
getdate() 'Current_system_time'
,statement --for reason
,*
FROM fn_get_audit_file('D:\code\SSMS\Audit\*', DEFAULT, DEFAULT) WHERE action_id = 'LGIF' -- LGIF mean Login Fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment