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.

Assuming that I do not have access to windows server, can I run a script from SSMS that would allow me to check whether allocation unit size is formatted with 64K?

share|improve this question
    
Why do you think SSMS is the right tool for these kinds of things? What are you going to do with the output in SSMS? –  Aaron Bertrand Jul 12 '12 at 19:57
add comment

1 Answer

Maybe this is one way:

EXEC master..xp_cmdshell 'fsutil fsinfo ntfsinfo "C:"';

Line 9 shows, e.g.:

Bytes Per Cluster :               4096

There are obviously more powerful ways to do this using, e.g. PowerShell, but as I suggested in my comment, it's hard to understand exactly what you're going to do with the output in SSMS, and what kind of effort you're willing to go to in order to use these methods from within SSMS... I'd say it's much better to get these values externally (which gives you so many more options), then update a table you can query from within SSMS.

share|improve this answer
1  
+1 - It would almost make more sense just to call a script from xpcmdshell that populates a table through powershell or something. –  JNK Jul 12 '12 at 20:27
1  
It's probably worth noting that fsutil requires administrator privileges, which hopefully the xp_cmdshell proxy doesn't have. I certainly agree with the general conclusion that this is better done externally than from within SQL Server, although if the OP has no OS-level access then presumably it's a hosted database server of some kind. –  Pondlife Jul 13 '12 at 15:36
    
@Pondlife and if it's a hosted server, what are you going to do with this information anyway? –  Aaron Bertrand Jul 13 '12 at 15:38
    
@AaronBertrand Exactly, I was also wondering about that. I assume if it's hosted by an external provider then the information has no practical value, and if it's hosted internally then the OP should just request the details from the sysadmin team. –  Pondlife Jul 13 '12 at 16:29
add comment

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.