Size of a single Record ? SQL

后端 未结 5 1543
名媛妹妹
名媛妹妹 2021-02-05 11:31

I have a scenario where every user has been allocated 2 MB of database space. Now I have to show Percenatge usage of their allocated space, to do so I need to know the size of s

5条回答
  •  萌比男神i
    2021-02-05 12:09

    Since showcontig is going to be deprecated, you can also use:

    SELECT * FROM sys.dm_db_index_physical_stats
    (DB_ID(N'DatabaseName'), OBJECT_ID(N'TableName'), NULL, NULL , 'DETAILED')
    

提交回复
热议问题