Win32_PerfFormattedData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSDatabases - WMI sample in VBScript

The foundations for Manageability in Windows 7/2008/Vista/XP/2000 and Millennium Edition/'98 are 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.

On this site, you can find many WMI samples.

The Win32_PerfFormattedData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSDatabases WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Win32_PerfFormattedData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSDatabases

Description

Example(s)

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSDatabases",,48)
For Each objItem in colItems
    Wscript.Echo "ActiveTransactions: " & objItem.ActiveTransactions
    Wscript.Echo "BackupPerRestoreThroughputPersec: " & objItem.BackupPerRestoreThroughputPersec
    Wscript.Echo "BulkCopyRowsPersec: " & objItem.BulkCopyRowsPersec
    Wscript.Echo "BulkCopyThroughputPersec: " & objItem.BulkCopyThroughputPersec
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Committableentries: " & objItem.Committableentries
    Wscript.Echo "DataFilesSizeKB: " & objItem.DataFilesSizeKB
    Wscript.Echo "DBCCLogicalScanBytesPersec: " & objItem.DBCCLogicalScanBytesPersec
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object
    Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime
    Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS
    Wscript.Echo "LogBytesFlushedPersec: " & objItem.LogBytesFlushedPersec
    Wscript.Echo "LogCacheHitRatio: " & objItem.LogCacheHitRatio
    Wscript.Echo "LogCacheReadsPersec: " & objItem.LogCacheReadsPersec
    Wscript.Echo "LogFilesSizeKB: " & objItem.LogFilesSizeKB
    Wscript.Echo "LogFilesUsedSizeKB: " & objItem.LogFilesUsedSizeKB
    Wscript.Echo "LogFlushesPersec: " & objItem.LogFlushesPersec
    Wscript.Echo "LogFlushWaitsPersec: " & objItem.LogFlushWaitsPersec
    Wscript.Echo "LogFlushWaitTime: " & objItem.LogFlushWaitTime
    Wscript.Echo "LogGrowths: " & objItem.LogGrowths
    Wscript.Echo "LogShrinks: " & objItem.LogShrinks
    Wscript.Echo "LogTruncations: " & objItem.LogTruncations
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "PercentLogUsed: " & objItem.PercentLogUsed
    Wscript.Echo "ReplPendingXacts: " & objItem.ReplPendingXacts
    Wscript.Echo "ReplTransRate: " & objItem.ReplTransRate
    Wscript.Echo "ShrinkDataMovementBytesPersec: " & objItem.ShrinkDataMovementBytesPersec
    Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object
    Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime
    Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS
    Wscript.Echo "TrackedtransactionsPersec: " & objItem.TrackedtransactionsPersec
    Wscript.Echo "TransactionsPersec: " & objItem.TransactionsPersec
    Wscript.Echo "WriteTransactionsPersec: " & objItem.WriteTransactionsPersec
Next