I am using in one of my reports to check for status of IFI being enabled on SQL server.
It works well when using dmv
sys.dm_server_services for SQL2016
However, in SQL2014 and SQL2012 i see difficulties in rendering this check via SQL query.
For example if i use below
EXEC sys.xp_readerrorlog 0, 1, N'Database Instant File Initialization';
There is no guarantee it will show status on file '0' and sometimes i keep querying the error log manually to find that out. How can i achieve the IFI check using a better way so that it can show up on my SSRS report