As you may already know, instant initialization is a way to prevent data (not log) file create and grow operations having to zero-initialize the new space before allowing it to be used. This can vastly speed up these operations as zero-initialization can take a *long* time for large files. This is especially useful in disaster recovery operations as the first phase of a restore is always to create the requisite files, if they don’t already exist. Cutting minutes or even hours from this phase can significantly reduce downtime. It’s available on XP SP2 and Windows Server 2003 and above. You can get more details from a blog post of Kimberly’s from March 2007.

The way to enable it is to give the SQL Server service account the ‘Perform volume maintenance tasks’ privilege and then restart the service. There’s no way to enable or disable it from within SQL Server, and until now, no way I’ve known of to tell whether it’s enabled from within SQL Server. I was teaching a Microsoft-internal class on Database Maintenance last week and one of the students came up with a neat way to tell – using xp_cmdshell to execute the whoami /priv command, which lists all the privileges that SQL Server service account has.

Edit 10/1/2010: I’ve removed all the whoami stuff because most people can’t use xp_cmdshell. Instead, enable trace flags 3004 and 3605 and try creating a dummy database. You’ll get a message in the errorlog indicating that SQL Server is zeroing out the log file for the new database. If you do *NOT* have instant initialization enabled, you’ll see a similar message for zeroing out the data file of the new database. Don’t forget to turn the trace flags off again.

Edit 2016: With SQL Server 2016 you can just look in the error log at instance startup and it will say if instant file initialization is enabled.