Central Management Server - data collection

  • I'm connected to 4 servers in one query on my CMS. I want to run this query on each server and insert the data into a database/table on my CMS server.

    How do I access my CMS database(dbstats) when SSMS can only see I am connected to 4 servers I am querying through one query window?

    DECLARE @driveSpace TABLE (drive CHAR(2), MBFree int)

    INSERT INTO @driveSpace

    EXEC sp_executesql N'xp_fixeddrives'

    INSERT INTO [CMSServerName]..dbstats..daychecklist ----< cannot see this reference!

    SELECT 'Drive Space', GETDATE(), 'Free space on ' + drive + ' is ' + CONVERT (VARCHAR(20), MBFree/1024) + ' Gigs'

    FROM @driveSpace

  • Nevermind, can't do it within CMS, have to use Linked Servers.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply