2

How do I see which table has taken up how much storage space in Microsoft SQL Server 2014?

Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
  • 5
    Possible duplicate of [Get size of all tables in database](https://stackoverflow.com/questions/7892334/get-size-of-all-tables-in-database) – Hoppeduppeanut Feb 27 '19 at 06:00

2 Answers2

5

Simplest way -> In SSMS's Object Explorer, right-click on the database, select Reports -> Standard Reports -> Disk Usage by Table.

Another simple way -> In SSMS, launch Object Explorer Details, drill down to a table, and select it. In the results pane, you'll see the size of that table.

Greg
  • 3,861
  • 3
  • 23
  • 58
  • Thank you so much, @Greg. I wish I could mark more than one answer as the right one. I was going to mark yours as the right one when I discovered I couldn't see the Reports context-menu item when browsing a SQL Azure database in SSMS. But Mukesh Arora's query did work on SQL Azure as well. Nevertheless, your suggested query works well on local databases and I found your answer to be very helpful. :-) – Water Cooler v2 Feb 27 '19 at 06:19
3

If you want to check space used by a particular table then you can use the below query

Single Table

EXEC sp_spaceused N'yourtableName'
 GO

For all the tables

sp_msforeachtable 'EXEC sp_spaceused [?]' 
GO
Mukesh Arora
  • 1,763
  • 2
  • 8
  • 19