Hello, How to find what the physical size of table in MS Sql 2005? Is it possible using sql query or not? Thanks.
+5
A:
Try the stored procedure:
exec sp_spaceused TableName
For all tables you could use:
exec sp_Msforeachtable 'exec sp_spaceused'
Yoda
2010-05-12 08:39:53
And how to show sizes from the all tables?
jitm
2010-05-12 08:40:41
forgot to remove table name there for a second ^^
Yoda
2010-05-12 08:45:53
+1
A:
You can use the sp_spaceused system procedure:
EXECUTE sp_spaceused 'YourTable'
AdaTheDev
2010-05-12 08:40:46
A:
SELECT table_schema, table_name, ROUND(data_length/1024/1024,2) total_size_mb FROM information_schema.tables WHERE table_name = 'emp_master' AND table_schema = 'emp_database';
RIDDHI
2010-05-12 09:35:56