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
Solved

SQL Server Capacity Script & Database Growth Script?

Posted on 2011-09-20
4
342 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql query 8 51
Webservices in T-SQL 3 34
SQL - format decimal in a string 5 39
TSQL convert date to string 4 34
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…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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