I always say that database sizing is one of the prime tasks and concern for any DBA. As a DBA you should ensure that there is no single record claiming space in the databasefor no reason.

DBA’s should keep an eye on table size regularly. Unreasonable data or tables should be chopped off as soon as possible. People have a habit of backing up a table on production database before performing any critical DML – update/delete.

Unfortunately 8 out of 10 times they forget to delete the backup tables. Such tables may be huge. This may increase the time taken to backup the database and szie of the backup file.

Here is the strored procedure to find the top 5 tables consumiung maximum space in the given database. This will help DBA’s in cleaning up unnecessary data or creating indexes for better performance.

Create this procedure inside the target database.

Execute the procedure: exec uspDBASpaceUsed

 P.S: In case you are unable to free up space from table, refer http://www.sqlservergeeks.com/author/riteshmedhe/#493



Ritesh Medhe

Like us on FaceBook Follow us on Twitter

Join the fastest growing SQL Server group on FaceBook