Table wise Memory Allocation

We can identify each table wise memory allocation in a Database using Sp_SpaceUsed.


Create Table #TableAllocation
(
[Table Name] Varchar(100),
Records Varchar(10),
Reserved Varchar(10),
Data Varchar(10),
[Index Size] Varchar(10),
UnUsed Varchar(10)
)
Insert #TableAllocation
Exec('Sp_MSForEachTable ''Sp_SpaceUsed ''''?''''''')
Go


Select * from #TableAllocation
Go


Drop Table #TableAllocation
Go

Result:

1 comment:

  1. Good goin maan... Congrats....

    ReplyDelete