4

Besides creating a new database and timing it, is there a simple way to determine whether or not Instant File Initialization is enabled/functioning?

(on Windows Server 2008 Enterprise)

O.O
  • 678
  • 2
  • 7
  • 16

3 Answers3

4

Using ntrights.exe, check if the SeManageVolumePrivilege priviledge is granted. IF you prefer a 'built in' tool, use secedit /export /areas USER_RIGHTS.

Remus Rusanu
  • 51,846
  • 4
  • 95
  • 172
  • I do prefer 'built in'. Just a FYI the secedit line you posted does not work. But this is the kind of answer I'm looking for. – O.O Jan 17 '12 at 19:21
  • secedit /export /areas USER_RIGHTS /cfg foo.txt if you need a working example. I did not post that because I found the idea of a command line tool that requires an output file and does not use the stdout quite embarrassing. Pipe into grep, anyone? – Remus Rusanu Jan 17 '12 at 19:24
  • I agree and it's not very easy on the eyes, now that I'm looking at the file – O.O Jan 17 '12 at 19:25
  • Ugh. I have no idea how to interpret this file. Time to do some learning I guess. – O.O Jan 17 '12 at 19:28
  • For what is worth, compiling your own tool that calls GetTokenInformation and asks for the TokenPrivileges class shouldn't be too hard... – Remus Rusanu Jan 17 '12 at 19:29
3
  • The account under which Sql Server is RUNNING should have rights to Perform Volume Maintenance Tasks privilege.

See here:

Control Panel->Administration->Local Security Policies->Local Policies->User Rights->Perform Volume Maintenance Tasks

Oleg Dok
  • 3,387
  • 25
  • 29
1

In the past I've used this method by John Sansom: http://www.johnsansom.com/sqlserver-instant-file-initialization/

Simple SQL script involving trace flags.

OliverAsmus
  • 878
  • 7
  • 11