Created
July 16, 2016 17:22
-
-
Save jeremykdev/c0d5b154a10b5623707d9b123200aa1c to your computer and use it in GitHub Desktop.
Find Microsoft SQL Server files by size
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
USE master; | |
SELECT | |
DB.name AS DatabaseName | |
, F.type_desc AS FileType | |
, F.size AS [SizeIn8KbPages] | |
, F.physical_name AS [PysicalFileName] | |
FROM sys.databases AS DB | |
INNER JOIN sys.master_files AS F ON ( DB.database_id = F.database_id ) | |
ORDER BY F.size DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment