Did You Forget?
This is another one of those settings that’s so important, Microsoft put a switch for it in the installer. And yet, I end up looking at servers where it’s not enabled.
When I ask why, I usually expect to hear some 2003 wisdom about security. But that doesn’t happen; it’s just blank stares.
How do you know if this is enabled?
SELECT dss.servicename, dss.service_account, dss.instant_file_initialization_enabled FROM sys.dm_server_services AS dss;
Simple as that.
Why Enable Instant File Initialization?
Turning this on allows SQL Server data files to grow without writing a bunch of zeroes out to disk. That can be useful in a number of ways.
Just picture SQL Server giving disk space a big ol’ hug and Windows not even getting jealous.
But Erik, you said data files, what about all those important transaction log files?
Sorry, there’s no helping them.
Put them on the fastest storage you can get and pray.
Enabling Instant File Initialization
You can use this command from dbatools to enable IFI. If you’re not comfortable with PowerShell, you can get it done this way:
If for some reason you didn’t turn this on when you installed SQL Server, just take the service account you got from up yonder, and type “secpol.msc” into the search bar.
After that, click on “User Rights Assignment” and look for the “Perform Volume Maintenance Tasks” entry in the Policy tab.
From there, it’s a matter of adding the service account here. If you’re using the default SQL Server service account, “NT Service\MSSQLSERVER…” it will likely already have it.
But you know, just in case. G’head and click that.
Thanks for reading!
Going Further
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. I’m offering a 75% discount to my blog readers if you click from here. I’m also available for consulting if you just don’t have time for that and need to solve performance problems quickly.