Thursday, March 29, 2012

data space used by a table in MSSQL Server 2005

How can I query (using TSQL) the data space used by a table in SQL Server 2005?

This is possible using SQL Serve Management studio. I can right click on table name and check the proeprties. But I want to write a TSQL script to check disk space used by all the individual tables in the database. How can I do that?

EXECUTE sp_spaceused 'MyTable'

|||

Thanks Arnie... sp_spaceused is what I was looking for.

sql

No comments:

Post a Comment