Blog Post

Azure SQL Blog
1 MIN READ

Efficient Time-Based Audit Log Filtering for Azure SQL Database

sravani-saluru's avatar
Jun 13, 2024

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 

Updated Jun 13, 2024
Version 2.0
No CommentsBe the first to comment