?
Solved

SQL Database Size Report for multiple sql srvers, instances & databases

Posted on 2012-04-02
4
Medium Priority
?
434 Views
Last Modified: 2012-06-27
Hi Friends,
We have multiple sql server boxes used as a back end for a variety of applications such as sharepoint, hyperion, navigon etc.
The question is how best we can collate (a report) which contains list of databases (instace & server names) & the size on disk.
This is just to track database growth for all sql servers from one interface/report.

Have tried out SSMS > Mangement > Management Data warehouse > disk usage reports.
Asking for same as such but for all sql databases, instances & servers in the data centre & report in one instance,database only.

Also, any altenative is most welcome.
In SQL space, we have 2005, 2008, 2008 R2 version.
0
Comment
Question by:Minesh Shah
[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
  • 2
4 Comments
 
LVL 5

Assisted Solution

by:25112
25112 earned 2000 total points
ID: 37796236
run the below query from central management server http://msdn.microsoft.com/en-us/library/bb934126.aspx (2008 and up only)
For prior version- put the query in SSIS package with a connection string to each instance desired..

SELECT
   (SELECT 'file_type' =  
   CASE  
       WHEN AF.groupid <> 0 THEN 'data'
       WHEN AF.groupid = 0 THEN 'log'
   END) AS 'file_type'
,  DB.name AS 'db_name'
,  AF.name AS 'logical_file_name'
,  AF.filename AS 'physical_file_name'
,  cast((AF.size * 8 / 1024.) as decimal(18,2))  'File_Size_in_MB'
FROM
   sys.databases DB
JOIN
   sys.sysaltfiles  AF ON
database_id = dbid
0
 
LVL 10

Author Comment

by:Minesh Shah
ID: 37823007
hi team,
sorry for delay.
well, above one works. thanks.
ended up in some script which stores data of all these instances in 1 database centrally.

wondering, can we do anything better! your thoughts..
0
 
LVL 5

Accepted Solution

by:
25112 earned 2000 total points
ID: 37847709
>>wondering, can we do anything better!
central management server - is it!
0
 
LVL 10

Author Closing Comment

by:Minesh Shah
ID: 37859977
ok
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

752 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