Sample reports for the Automated DBA: Space Usage SnapShotterReport 1: Gets the 100 largest indexes by total buffer cache space usageReport 2: Gets the 100 largest tables by total reserved pagesReport 3: Gets the largest tables in each database (optionally limiting to a single database) and provides a running total of space usage as well as the growth from the previous snapshot. Size sorting is by the most recent date sample.These procs should go into the same database as the SpaceLog_* tablesThere are many more potential reports that can be created from the data captured by the Space Usage SnapShotter.

Required Input Parameters none

Optional Input Parameters @MinPrime=1 The minimum prime value to generate. You will usually want this at 1 @MaxPrime=2097152 The maximum prime value to generate. The default value should use all of the values for most peoples' table of numbers (622^2=386884 for mine to completely fill 2-level deep clustered index).

Copyright: Licensed under the L-GPL - a weak copyleft license - you are permitted to use this as a component of a proprietary database and call this from proprietary software. Copyleft lets you do anything you want except plagarize, conceal the source, proprietarize modifications, or prohibit copying & re-distribution of this script/proc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

see <http://www.fsf.org/licensing/licenses/lgpl.html> for the license text.