March 1, 2014 at 5:09 pm
Comments posted to this topic are about the item Find Size of files used in Database
March 3, 2014 at 7:22 am
This is a basic helpful script. I just added comma formatting to make it easier to read. Thank you.
SELECT
Name
, Filename
, convert(varchar, cast(convert(decimal(12,2),round(size/128.000,2)) as money), 1) as FileSizeMB
, convert(varchar, cast(convert(decimal(12,2),round(fileproperty(name,'SpaceUsed')/128.000,2)) as money), 1) as SpaceUsedMB
, convert(varchar, cast(convert(decimal(12,2),round((size-fileproperty(name,'SpaceUsed'))/128.000,2)) as money), 1) as FreeSpaceMB
FROM
dbo.sysfiles
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy