--Using this query we can find out complete byte size of All tables in the
--databse
SELECT CASE WHEN (GROUPING(sysObj.name)=1) THEN 'All_Tables'
ELSE ISNULL(sysObj.name, 'unknown') END AS Table_CompleteName,
SUM(obj.length) AS Byte_Length
FROM sysobjects sysObj, syscolumns obj
WHERE sysObj.xtype='u' AND obj.id=sysObj.id
GROUP BY sysObj.name
WITH CUBE
--select * from sysobjects
--select * from syscolumns
If you have any queries or suggestions, please feel free to ask in comments section.
--databse
SELECT CASE WHEN (GROUPING(sysObj.name)=1) THEN 'All_Tables'
ELSE ISNULL(sysObj.name, 'unknown') END AS Table_CompleteName,
SUM(obj.length) AS Byte_Length
FROM sysobjects sysObj, syscolumns obj
WHERE sysObj.xtype='u' AND obj.id=sysObj.id
GROUP BY sysObj.name
WITH CUBE
--select * from sysobjects
--select * from syscolumns
If you have any queries or suggestions, please feel free to ask in comments section.
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.