Solved

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

Posted on 2012-04-02
4
418 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
  • 2
  • 2
4 Comments
 
LVL 5

Assisted Solution

by:25112
25112 earned 500 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 500 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

776 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