Often SQL Server Database Administrators struggle with hard disk space and constantly strive to clean up ‘Tables’, writing many queries to find which Table uses the most hard disk space.
This article illustrates how to query the System Tables to find the space usage, which helps Database Administrators identify the Tables that are using the most space in order to archive the old data and purge un-necessary data.
1. Logon to the SQL Server Instance [SQL Server 2005 or SQL Server 2008].
2. Navigate to the database that you want to get the space information on.
3. Copy and Paste the code to your Query Window and Execute it.
4. Check the Results and view the Used Table Space within the selected Database.