We manually generate a report of file groups and their associated data files each day for each of our databases.
For each database we take data from dbcc showfilestats and assemble it into an Excel spreadsheet (see below).
I would like to use a SQL job to generate the reports (results do not need to be in Excel format). I can insert the data from the DBCC into a table; but, I'm stuck on how to write a select statement that will break on file group and provide column totals. I've been looking at group by; but, I don't see how to make it work.
Suggestions?
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||