Skip to content
  • SQL-Server
  • Linux
  • PowerShell
  • Ispconfig
  • Avamar
  • General
  • Oracle
  • SAP Hana
Facebook LinkedIn
SCHELSTRAETE.ORG

I.T. minded

  • SQL-Server
  • Linux
  • PowerShell
  • Ispconfig
  • Avamar
  • General
  • Oracle
  • SAP Hana
SCHELSTRAETE.ORG

I.T. minded

T-SQL: Show sizes of all tables in a database

  • BartBart
  • February 11, 2019
  • SQL-Server

You can use the t-sql code below in order display the size of each table in a specific database.

use MY_DATABASE_NAME
go
EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"
go
Default image
Bart
Articles: 91
Previous Post T-SQL: Kill all connections to a specific database
Next Post T-SQL: Find table in complete instance
No results

Recent Posts

  • Linux: create MO files from PO files (wp)
  • Linux: migrate storage with pvmove
  • Systemd: automatically restart after failure
  • Clamav: limit memory usage
  • Oracle: Map ASM disks to physical disks

Archives

  • January 2022
  • December 2021
  • October 2021
  • September 2021
  • July 2020
  • March 2020
  • February 2020
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • February 2019
  • November 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016

Categories

  • Avamar
  • General
  • Ispconfig
  • Linux
  • Oracle
  • PowerShell
  • SAP Hana
  • SQL-Server
  • Uncategorized

Related Posts

T-SQL: Group timestamp by Year/Month

  • January 6, 2022

T-SQL: Add/drop pass to open a database master key

  • January 6, 2022

T-SQL: Jobs in suspended state

  • January 2, 2022

Copyright © 2022 Schelstraete.org