CacheHitRatio - property in ROOT\CIMV2 namespace

CacheHitRatio in other namespaces

List of classes with CacheHitRatio local property in ROOT\CIMV2 namespace

propertyClassOrigin
CacheHitRatioWin32_PerfFormattedData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCatalogMetadataWin32_PerfFormattedData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCatalogMetadata
CacheHitRatioWin32_PerfFormattedData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCursorManagerbyTypeWin32_PerfFormattedData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCursorManagerbyType
CacheHitRatioWin32_PerfFormattedData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDPlanCacheWin32_PerfFormattedData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDPlanCache
CacheHitRatioWin32_PerfFormattedData_MSSQLSERVER_SQLServerCatalogMetadataWin32_PerfFormattedData_MSSQLSERVER_SQLServerCatalogMetadata
CacheHitRatioWin32_PerfFormattedData_MSSQLSERVER_SQLServerCursorManagerbyTypeWin32_PerfFormattedData_MSSQLSERVER_SQLServerCursorManagerbyType
CacheHitRatioWin32_PerfFormattedData_MSSQLSERVER_SQLServerPlanCacheWin32_PerfFormattedData_MSSQLSERVER_SQLServerPlanCache
CacheHitRatioWin32_PerfRawData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCatalogMetadataWin32_PerfRawData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCatalogMetadata
CacheHitRatioWin32_PerfRawData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCursorManagerbyTypeWin32_PerfRawData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDCursorManagerbyType
CacheHitRatioWin32_PerfRawData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDPlanCacheWin32_PerfRawData_MSSQLMICROSOFTNumberNumberWID_MSSQLMICROSOFTNumberNumberWIDPlanCache
CacheHitRatioWin32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadataWin32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata
CacheHitRatioWin32_PerfRawData_MSSQLSERVER_SQLServerCursorManagerbyTypeWin32_PerfRawData_MSSQLSERVER_SQLServerCursorManagerbyType
CacheHitRatioWin32_PerfRawData_MSSQLSERVER_SQLServerPlanCacheWin32_PerfRawData_MSSQLSERVER_SQLServerPlanCache

Code samples for CacheHitRatio property

Get instance of WMI class using GetObject, CacheHitRatio property of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata

Short VBS code - get a single specified instance of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata class or get a default unnamed instance (singleton) of the class, using one single command GetObject with exact path of the wmi object.

'https://wutils.com/wmi/
Dim wmiObject
Set wmiObject = GetObject( _
 "WINMGMTS:\\.\ROOT\cimv2:" + _
 "Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata.Name=""ReportServer""")
Wscript.Echo wmiObject.CacheHitRatio 'or other property name, see properties
See more VBS samples of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata class

WMI query - sample windows WQL with C#, CacheHitRatio property of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata

Get a specified instance of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this c# sample code.
See in another language: VBScript, VB.Net.
//https://wutils.com/wmi/

//Project -> Add reference -> System.Management
//using System.Management;

//create a management scope object
ManagementScope scope = new ManagementScope("\\\\.\\ROOT\\cimv2");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata Where Name=\"ReportServer\"");

//create object searcher
ManagementObjectSearcher searcher =
                        new ManagementObjectSearcher(scope, query);

//get a collection of WMI objects
ManagementObjectCollection queryCollection = searcher.Get();

//enumerate the collection.
foreach (ManagementObject m in queryCollection) 
{
  // access properties of the WMI object
  Console.WriteLine("CacheHitRatio : {0}", m["CacheHitRatio"]);
  
}

WMI query - sample windows WQL with VB.Net, CacheHitRatio property of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata

Get a specified instance of Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this VB.Net sample code.
See in another language: VBScript, C#
'Project -> Add reference -> System.Management
'Imports System.Management

'Get the namespace management scope
Dim Scope As New ManagementScope("\\.\ROOT\cimv2")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM Win32_PerfRawData_MSSQLSERVER_SQLServerCatalogMetadata Where Name="ReportServer"")

'Create object searcher
Dim Searcher As New ManagementObjectSearcher(Scope, Query)

'Get a collection of WMI objects
Dim queryCollection As ManagementObjectCollection = Searcher.Get

'Enumerate wmi object 
For Each mObject As ManagementObject In queryCollection
  'write out some property value
  Console.WriteLine("CacheHitRatio : {0}", mObject("CacheHitRatio"))
Next
comments powered by Disqus
WUtils.com