Displaying the Sizes of Your SQL Server's Database's Tables

Displaying the Sizes of Your SQL Server's Database's Tables. Uses ASP.NET to show you how much space you are using for each table in your SQL Server database. Returns table name, number of rows, reserved space, space used by table data, space used by table indexes and unused space.


Tags: , ,

Comments

Anonymous said…
Of course you can also use Query Analyzer to check the size as well as shrink your logs to reduce the space your database takes up

ensure you have your db selected in the drop down then paste the following

Exec sp_spaceused

then run, it will show you the size of your database.


Shrink code, via Query Analyzer

DBCC SHRINKDATABASE (database_name_here, TRUNCATEONLY)
GO
BACKUP LOG [database_name_here]
WITH TRUNCATE_ONLY

If this does not drop the size, try the following

DBCC SHRINKDATABASE (database_name_here, TRUNCATEONLY)
GO
BACKUP LOG [database_name_here]
WITH NO_LOG

Popular posts from this blog

Select box manipulation with jQuery

iTextSharp: Generating a Basic PDF file (ASP.NET/C#)

Popup Window Countdown (JavaScript)