,,the table. It gives me control over which all servers to check among my long list of linked servers.
Not sure how efficient & advisable it is to link many servers.
Being conservative, I run a small sp as part of each nightly backup/maint plan on each SQL server I administer. It writes the free space into a small cummulative table in the Master db, which I can then retrieve with an external application every morning.
CREATE TABLE [dbo].[tblStatsDisk](
[ID] [int] IDENTITY(1,1) NOT NULL,
[DiskTimeStamp] [datetime] NULL,
[Drive] [char](1) NULL,
[FreeDisk] [bigint] NULL
Maint Plan SP:
-- Description: Poll free disk space on each drive immediately after the backup
ALTER PROCEDURE [dbo].[GetDiskFree]
/* TEST HARNESS
select * from dbo.tblStatsDisk
SET NOCOUNT ON;
INSERT into dbo.tblStatsDisk (drive, FreeDisk)
-- this command creates the rows (one for each drive) with NULL date, srv... fields
-- the columns must allow NULL especially disktimestamp
SET DiskTimeStamp = (GETDATE())
where disktimestamp is null
How you collect and centralise this later is another story ... but you start small with a modular approach then build an application that combines this with some DB size stats collected from the backup DMV routines.