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
You can calculate the size a row (of number of rows) with a fairly complex formula. See Books Online (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/81fd5ec9-ce0f-4c2c-8ba0-6c483cea6c75.htm) for the exact details.
In short:
Take the number of columns and determine the size of each column by its datatype for fixed-length datatypes.
Calculate the space used for any nullable columns Then calculate the rowspace:
Row_Size = Fixed_Data_Size + Variable_Data_Size + Null_Bitmap + 4