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.
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