Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1063751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:49:47+00:00 2026-05-16T18:49:47+00:00

How can I see all disk usage of all my databases on a given

  • 0

How can I see all disk usage of all my databases on a given SQL Server in one single query. I have around 15 different databases on my server and I want to see which one is using the maximum disk space.

I know I can see reports of Disk Usage per database in SSMS or logon to the server and see the size of MDF/LDF files but this seems like a pretty obvious feature that should come with SSMS and I cant seem to find it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:49:48+00:00Added an answer on May 16, 2026 at 6:49 pm

    I’m not aware of any built in way but you can use the (undocumented) sp_MSforeachdb procedure for this.

    CREATE TABLE #files(
        [dbname] [sysname] NOT NULL,
        [name] [sysname] NOT NULL,
        [physical_name] [nvarchar](260) NOT NULL,
        [size] [int] NOT NULL,
        [max_size] [int] NOT NULL,
        [growth] [int] NOT NULL
    )
    
    EXEC sp_MSforeachdb ' 
    insert into #files
    select ''[?]'',name,physical_name,size,max_size,growth
    from [?].sys.database_files'
    
    
    SELECT [dbname]
          ,[name]
          ,[physical_name]
          ,[size]
          ,[max_size]
          ,[growth]
      FROM #files
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a setup a SQL Server instance that I can see from all
In Visual Studio 2008, I can see all my project files in my Solution
How can I see all the records that appear more than once per day?
I am wondering why I can't see all page events in visual studio 2008,
Say a table has several subclass types. How can I see all columns from
I can see people asking all the time whether multiple inheritance should be included
I see all sample from nServiceBus to be a standalone process, so can it
Hi All I am havinga problem with Entity framework, basically as you can see
I get this error all the time. And as I can see, there are
UPDATE The issue is solved, all the code you can see works. Hello! I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.