August 27, 2020 at 12:00 am
Comments posted to this topic are about the item Getting File System Volume Info
August 27, 2020 at 12:28 am
You can get the C drive size from sys.dm_os_volume_stats view only when you have a database on C drive.
"Returns information about the operating system volume (directory) on which the specified databases and files are stored in SQL Server."
The answer is not correct, sorry.
August 27, 2020 at 12:36 am
I agree with ilyaioffe, which means that the most correct answer is actually the XP_CmdShell answer which, by the way, IS also a supported answer.
What you have listed as a correct answer isn't actually correct for the reason that ilyaioffe posted.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 27, 2020 at 4:20 am
Altered the question to note a database file on the c: drive.
August 27, 2020 at 5:36 am
This is a really handy bit if information, thanks Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
August 27, 2020 at 1:20 pm
3 alternative ways for your mind entertainment
Regards,Yelena Varsha
August 31, 2020 at 6:38 pm
There is a new DMV added for this with 2019. And it's not listed. So that new DMV should be the correct answer and the question wouldn't have had to be changed. sys.dm_os_enumerate_fixed_drives
Sue
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply