Solved

SQL Server Capacity Script & Database Growth Script?

Posted on 2011-09-20
4
336 Views
Last Modified: 2012-05-12
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
Comment
Question by:Omega002
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
rajvja earned 500 total points
ID: 36568098
Hi

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

this will get the space used for the DB
0
 

Author Comment

by:Omega002
ID: 36568180
I need one for all databases
0
 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 500 total points
ID: 36568285
EXEC sp_msforeachdb @command1="use ? exec sp_spaceused"
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now