Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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)

share|improve this question

3 Answers 3

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

share|improve this answer
    
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
  • 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

share|improve this answer
    
I'd rather not have to do this. Isn't there an easier way. Maybe a simple command or cmdlet I can run? –  O.O Jan 17 '12 at 19:00
    
@subt13 - this is the way to check. –  JNK Jan 17 '12 at 19:01
    
@JNK - Imagine if you have to do this on 100 machines. Surely this isn't the only way :) –  O.O Jan 17 '12 at 19:02
    
A quick google search pointed me to an article by Kendra Little. @OlegDok feel free to edit this into your answer. –  Mark Storey-Smith Jan 17 '12 at 19:06
    
@MarkStorey-Smith - it looks like that script grants the permissions, not checks for them –  JNK Jan 17 '12 at 19:14

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.

share|improve this answer
    
That involves creating a database. I want to avoid doing that. –  O.O Jan 17 '12 at 19:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.