SQL Server Audit failed to create the audit file 'E:\FolderName1\FolderName2\AuditNameHere_3F69545B-8B6C-4BEF-A69D-759A5E167D19.sqlaudit'. Make sure that the disk is not full and that the SQL Server service account has the required permissions to create and write to the file.

Though you can see the below error in SQL Server for SQL SERVER AUDIT This is might mislead us some times. In my environment, there is no SQL Server Service account permission issue or no space issue though the below-mentioned error keeps on occurring.

In the respective  E drive path(mentioned in the error message below)(see the second  image) if the count of files is more than mentioned in the Maximum files. Even at this time, there is a chance that this error might occur.




EXEC sp_readerrorlog 0,1,'TARGET_CREATION_FAILED'
GO
EXEC sp_readerrorlog 0,1,'AuditNameHere'
Audit: Server Audit: 65543, State changed from: STARTED to: TARGET_CREATION_FAILED
go
SQL Server Audit failed to create the audit file
'E:\FolderName1\FolderName2\AuditNameHere_3F69545B-8B6C-4BEF-A69D-759A5E167D19.sqlaudit'.
Make sure that the disk is not full and that the SQL Server service account has the
required permissions to create and write to the file.

Go to server security expand the folder and you can find Audits


Workaround:  So in my case the I moved one of the files from E drive to another drive and it worked for me.

select * from sys.dm_server_audit_status










Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server