Efficient Time-Based Audit Log Filtering for Azure SQL Database

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

We are happy to announce that, we’ve released an enhanced version of fn_get_audit_file. Now, customers can easily specify their desired time range to retrieve audit logs more efficiently. 

 

The sys.fn_get_audit_file_v2 function in Azure SQL Database is designed to retrieve audit log data with enhanced efficiency compared to its predecessor, sys.fn_get_audit_file. The new function introduces time-based filtering at both the file and record levels, providing significant performance improvements, particularly for queries targeting specific time ranges.

 

Function Syntax

sys.fn_get_audit_file_v2 ( file_pattern, initial_file_name, audit_record_offset, start_time, end_time )

 

for more details, please refer the documentation here:  https://learn.microsoft.com/en-us/sql/relational-databases/system-functions/sys-fn-get-audit-file-v2-transact-sql 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.