Azure SQL Hyperscale Named replica audit files – “There are no audit files for the selected criteria

Posted by

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

When you enable Auditing on Azure SQL, you can select a storage account as destination. 

One interesting option to consume these audit logs is to use "Merge Audit Files" option included on SSMS (SQL Server Management Studio) and choose the option to add files directly from the Azure Blob Storage

 

Palomag_MSFT_0-1668015543032.png

Palomag_MSFT_1-1668015688547.png

For regular read-write databases this procedure is very useful because it allows you to select a specific timeframe and SSMS chooses and download for you those .xel files related to the timeframe. 

 

If you are in front of a Read Only Named Replica database, you will be able to see the name of the database on the list and select it. 

 

Palomag_MSFT_2-1668015981616.png

 

But then, you will receive an error indicating that there are no files for the selected search criteria. Based on the error, you could incorrectly think that audit is not collecting data for this Hyperscale Named replica. 

 

Palomag_MSFT_3-1668016123543.png

 

In fact, data is being saved on your storage account, but is not directly stored under the regular path were SSMS is looking for "ServerName\DatabaseName\SqlDbAuditing_ServerAudit_NoRetention\YYYY-MM-DD", in the case of Hyperscale Named replica database the route where logs are saved is "ServerName\DatabaseName\SqlDbAuditing_ServerAudit_NoRetention\YYYY-MM-DD\RO", and this is the reason because SSMS is not able to find them. 

So, data is available, but you will need download files from the storage account a merge them taking them directly from your local disk. 

 

Enjoy Paloma.- 

 

 

 


Hyperscale secondary replicas

 

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.