Win32_PerfFormattedData_MSSQLSERVER vbscript sample code
The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The Win32_PerfFormattedData_MSSQLSERVER WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * From Win32_PerfFormattedData_MSSQLSERVER_SQLServerAccessMethods") For Each objItem in colItems WScript.Echo "AUcleanupbatchesPersec:" & objItem.AUcleanupbatchesPersec WScript.Echo "AUcleanupsPersec:" & objItem.AUcleanupsPersec WScript.Echo "ByreferenceLobCreateCount:" & objItem.ByreferenceLobCreateCount WScript.Echo "ByreferenceLobUseCount:" & objItem.ByreferenceLobUseCount WScript.Echo "Caption:" & objItem.Caption WScript.Echo "CountLobReadahead:" & objItem.CountLobReadahead WScript.Echo "CountPullInRow:" & objItem.CountPullInRow WScript.Echo "CountPushOffRow:" & objItem.CountPushOffRow WScript.Echo "DeferreddroppedAUs:" & objItem.DeferreddroppedAUs WScript.Echo "DeferredDroppedrowsets:" & objItem.DeferredDroppedrowsets WScript.Echo "Description:" & objItem.Description WScript.Echo "DroppedrowsetcleanupsPersec:" & objItem.DroppedrowsetcleanupsPersec WScript.Echo "DroppedrowsetsskippedPersec:" & objItem.DroppedrowsetsskippedPersec WScript.Echo "ExtentDeallocationsPersec:" & objItem.ExtentDeallocationsPersec WScript.Echo "ExtentsAllocatedPersec:" & objItem.ExtentsAllocatedPersec WScript.Echo "FailedAUcleanupbatchesPersec:" & objItem.FailedAUcleanupbatchesPersec WScript.Echo "Failedleafpagecookie:" & objItem.Failedleafpagecookie WScript.Echo "Failedtreepagecookie:" & objItem.Failedtreepagecookie WScript.Echo "ForwardedRecordsPersec:" & objItem.ForwardedRecordsPersec WScript.Echo "FreeSpacePageFetchesPersec:" & objItem.FreeSpacePageFetchesPersec WScript.Echo "FreeSpaceScansPersec:" & objItem.FreeSpaceScansPersec WScript.Echo "Frequency_Object:" & objItem.Frequency_Object WScript.Echo "Frequency_PerfTime:" & objItem.Frequency_PerfTime WScript.Echo "Frequency_Sys100NS:" & objItem.Frequency_Sys100NS WScript.Echo "FullScansPersec:" & objItem.FullScansPersec WScript.Echo "IndexSearchesPersec:" & objItem.IndexSearchesPersec WScript.Echo "LobHandleCreateCount:" & objItem.LobHandleCreateCount WScript.Echo "LobHandleDestroyCount:" & objItem.LobHandleDestroyCount WScript.Echo "LobSSProviderCreateCount:" & objItem.LobSSProviderCreateCount WScript.Echo "LobSSProviderDestroyCount:" & objItem.LobSSProviderDestroyCount WScript.Echo "LobSSProviderTruncationCount:" & objItem.LobSSProviderTruncationCount WScript.Echo "MixedpageallocationsPersec:" & objItem.MixedpageallocationsPersec WScript.Echo "Name:" & objItem.Name WScript.Echo "PagecompressionattemptsPersec:" & objItem.PagecompressionattemptsPersec WScript.Echo "PageDeallocationsPersec:" & objItem.PageDeallocationsPersec WScript.Echo "PagesAllocatedPersec:" & objItem.PagesAllocatedPersec WScript.Echo "PagescompressedPersec:" & objItem.PagescompressedPersec WScript.Echo "PageSplitsPersec:" & objItem.PageSplitsPersec WScript.Echo "ProbeScansPersec:" & objItem.ProbeScansPersec WScript.Echo "RangeScansPersec:" & objItem.RangeScansPersec WScript.Echo "ScanPointRevalidationsPersec:" & objItem.ScanPointRevalidationsPersec WScript.Echo "SkippedGhostedRecordsPersec:" & objItem.SkippedGhostedRecordsPersec WScript.Echo "TableLockEscalationsPersec:" & objItem.TableLockEscalationsPersec WScript.Echo "Timestamp_Object:" & objItem.Timestamp_Object WScript.Echo "Timestamp_PerfTime:" & objItem.Timestamp_PerfTime WScript.Echo "Timestamp_Sys100NS:" & objItem.Timestamp_Sys100NS WScript.Echo "Usedleafpagecookie:" & objItem.Usedleafpagecookie WScript.Echo "Usedtreepagecookie:" & objItem.Usedtreepagecookie WScript.Echo "WorkfilesCreatedPersec:" & objItem.WorkfilesCreatedPersec WScript.Echo "WorktablesCreatedPersec:" & objItem.WorktablesCreatedPersec WScript.Echo "WorktablesFromCacheRatio:" & objItem.WorktablesFromCacheRatio WScript.Echo "" WScript.Echo "########" WScript.Echo "" Next