Created
May 21, 2018 16:43
-
-
Save dcouto/bbd53641fcfe6f62f98318e7112f396b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
D.name, | |
F.Name AS FileType, | |
F.physical_name AS PhysicalFile, | |
F.state_desc AS OnlineStatus, | |
CAST((F.size*8)/1024 AS int) AS [FileSize (MB)] | |
--CAST(F.size*8 AS VARCHAR(32)) as SizeInBytes | |
FROM | |
sys.master_files F | |
INNER JOIN sys.databases D ON D.database_id = F.database_id | |
ORDER BY | |
[FileSize (MB)] DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment