patternsqlMinor
Can I check what the allocation unit size is on my drives via a query?
Viewed 0 times
canthecheckwhatsizequeryviadrivesallocationunit
Problem
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?
Solution
Maybe this is one way:
Line 9 shows, e.g.:
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.
EXEC master..xp_cmdshell 'fsutil fsinfo ntfsinfo "C:"';Line 9 shows, e.g.:
Bytes Per Cluster : 4096There 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.
Code Snippets
EXEC master..xp_cmdshell 'fsutil fsinfo ntfsinfo "C:"';Bytes Per Cluster : 4096Context
StackExchange Database Administrators Q#20804, answer score: 5
Revisions (0)
No revisions yet.