Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Server Capacity Script & Database Growth Script?

Posted on 2011-09-20
4
Medium Priority
?
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
rajvja earned 2000 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 2000 total points
ID: 36568285
EXEC sp_msforeachdb @command1="use ? exec sp_spaceused"
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

610 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