• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

SQL Server Capacity Script & Database Growth Script?

Does anyone have a procedure that will give me all SQL Server database size, server name, file location and how much space is available on the drive that the database resides on? Also I need a script that will track database growth daily, weekly and monthly. The version of SQL this will be used for is SQL Server 2005 and 2008. Please advise.
0
Omega002
Asked:
Omega002
  • 2
2 Solutions
 
rajvjaCommented:
Hi

USE AdventureWorks2008R2;
GO
EXEC sp_spaceused N'Purchasing.Vendor';
GO

this will get the space used for the DB
0
 
Omega002Author Commented:
I need one for all databases
0
 
rajvjaCommented:
EXEC sp_msforeachdb @command1="use ? exec sp_spaceused"
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now