Sunday, October 17, 2010

Find the database size in SQL Server

This is very important to find regularly if you are hosting the web site in hosting providers. The database size grows day to day and we have to find it more often. otherwise it grows than the given size and account will be suspended.  Below is the command used to find the size of the database and logs.

SELECT name,size from sys.database_files

Here is the sample output:

Hope this helps.

No comments:

Post a Comment