HostName - property in ROOT\Microsoft\SqlServer\ServerEvents\MSSQLSERVER namespace

HostName in other namespaces

List of classes with HostName local property in ROOT\Microsoft\SqlServer\ServerEvents\MSSQLSERVER namespace

propertyClassOrigin
HostNameASSEMBLY_LOADASSEMBLY_LOAD
HostNameAUDIT_ADD_DB_USER_EVENTAUDIT_ADD_DB_USER_EVENT
HostNameAUDIT_ADD_LOGIN_TO_SERVER_ROLE_EVENTAUDIT_ADD_LOGIN_TO_SERVER_ROLE_EVENT
HostNameAUDIT_ADD_MEMBER_TO_DB_ROLE_EVENTAUDIT_ADD_MEMBER_TO_DB_ROLE_EVENT
HostNameAUDIT_ADD_ROLE_EVENTAUDIT_ADD_ROLE_EVENT
HostNameAUDIT_ADDLOGIN_EVENTAUDIT_ADDLOGIN_EVENT
HostNameAUDIT_APP_ROLE_CHANGE_PASSWORD_EVENTAUDIT_APP_ROLE_CHANGE_PASSWORD_EVENT
HostNameAUDIT_BACKUP_RESTORE_EVENTAUDIT_BACKUP_RESTORE_EVENT
HostNameAUDIT_CHANGE_AUDIT_EVENTAUDIT_CHANGE_AUDIT_EVENT
HostNameAUDIT_CHANGE_DATABASE_OWNERAUDIT_CHANGE_DATABASE_OWNER
HostNameAUDIT_DATABASE_MANAGEMENT_EVENTAUDIT_DATABASE_MANAGEMENT_EVENT
HostNameAUDIT_DATABASE_OBJECT_ACCESS_EVENTAUDIT_DATABASE_OBJECT_ACCESS_EVENT
HostNameAUDIT_DATABASE_OBJECT_GDR_EVENTAUDIT_DATABASE_OBJECT_GDR_EVENT
HostNameAUDIT_DATABASE_OBJECT_MANAGEMENT_EVENTAUDIT_DATABASE_OBJECT_MANAGEMENT_EVENT
HostNameAUDIT_DATABASE_OBJECT_TAKE_OWNERSHIP_EVENTAUDIT_DATABASE_OBJECT_TAKE_OWNERSHIP_EVENT
HostNameAUDIT_DATABASE_OPERATION_EVENTAUDIT_DATABASE_OPERATION_EVENT
HostNameAUDIT_DATABASE_PRINCIPAL_IMPERSONATION_EVENTAUDIT_DATABASE_PRINCIPAL_IMPERSONATION_EVENT
HostNameAUDIT_DATABASE_PRINCIPAL_MANAGEMENT_EVENTAUDIT_DATABASE_PRINCIPAL_MANAGEMENT_EVENT
HostNameAUDIT_DATABASE_SCOPE_GDR_EVENTAUDIT_DATABASE_SCOPE_GDR_EVENT
HostNameAUDIT_DBCC_EVENTAUDIT_DBCC_EVENT
HostNameAUDIT_LOGINAUDIT_LOGIN
HostNameAUDIT_LOGIN_CHANGE_PASSWORD_EVENTAUDIT_LOGIN_CHANGE_PASSWORD_EVENT
HostNameAUDIT_LOGIN_CHANGE_PROPERTY_EVENTAUDIT_LOGIN_CHANGE_PROPERTY_EVENT
HostNameAUDIT_LOGIN_FAILEDAUDIT_LOGIN_FAILED
HostNameAUDIT_LOGIN_GDR_EVENTAUDIT_LOGIN_GDR_EVENT
HostNameAUDIT_LOGOUTAUDIT_LOGOUT
HostNameAUDIT_SCHEMA_OBJECT_ACCESS_EVENTAUDIT_SCHEMA_OBJECT_ACCESS_EVENT
HostNameAUDIT_SCHEMA_OBJECT_GDR_EVENTAUDIT_SCHEMA_OBJECT_GDR_EVENT
HostNameAUDIT_SCHEMA_OBJECT_MANAGEMENT_EVENTAUDIT_SCHEMA_OBJECT_MANAGEMENT_EVENT
HostNameAUDIT_SCHEMA_OBJECT_TAKE_OWNERSHIP_EVENTAUDIT_SCHEMA_OBJECT_TAKE_OWNERSHIP_EVENT
HostNameAUDIT_SERVER_ALTER_TRACE_EVENTAUDIT_SERVER_ALTER_TRACE_EVENT
HostNameAUDIT_SERVER_OBJECT_GDR_EVENTAUDIT_SERVER_OBJECT_GDR_EVENT
HostNameAUDIT_SERVER_OBJECT_MANAGEMENT_EVENTAUDIT_SERVER_OBJECT_MANAGEMENT_EVENT
HostNameAUDIT_SERVER_OBJECT_TAKE_OWNERSHIP_EVENTAUDIT_SERVER_OBJECT_TAKE_OWNERSHIP_EVENT
HostNameAUDIT_SERVER_OPERATION_EVENTAUDIT_SERVER_OPERATION_EVENT
HostNameAUDIT_SERVER_PRINCIPAL_IMPERSONATION_EVENTAUDIT_SERVER_PRINCIPAL_IMPERSONATION_EVENT
HostNameAUDIT_SERVER_PRINCIPAL_MANAGEMENT_EVENTAUDIT_SERVER_PRINCIPAL_MANAGEMENT_EVENT
HostNameAUDIT_SERVER_SCOPE_GDR_EVENTAUDIT_SERVER_SCOPE_GDR_EVENT
HostNameBITMAP_WARNINGBITMAP_WARNING
HostNameDATA_FILE_AUTO_GROWDATA_FILE_AUTO_GROW
HostNameDATA_FILE_AUTO_SHRINKDATA_FILE_AUTO_SHRINK
HostNameERRORLOGERRORLOG
HostNameEVENTLOGEVENTLOG
HostNameEXCEPTIONEXCEPTION
HostNameEXCHANGE_SPILL_EVENTEXCHANGE_SPILL_EVENT
HostNameEXECUTION_WARNINGSEXECUTION_WARNINGS
HostNameHASH_WARNINGHASH_WARNING
HostNameLOCK_DEADLOCKLOCK_DEADLOCK
HostNameLOCK_ESCALATIONLOCK_ESCALATION
HostNameLOG_FILE_AUTO_GROWLOG_FILE_AUTO_GROW
HostNameLOG_FILE_AUTO_SHRINKLOG_FILE_AUTO_SHRINK
HostNameMISSING_COLUMN_STATISTICSMISSING_COLUMN_STATISTICS
HostNameMISSING_JOIN_PREDICATEMISSING_JOIN_PREDICATE
HostNameMOUNT_TAPEMOUNT_TAPE
HostNameSORT_WARNINGSSORT_WARNINGS
HostNameTRC_DEPRECATIONTRC_DEPRECATION
HostNameTRC_OBJECTSTRC_OBJECTS
HostNameTRC_OLEDBTRC_OLEDB
HostNameTRC_PERFORMANCETRC_PERFORMANCE
HostNameTRC_QUERY_NOTIFICATIONSTRC_QUERY_NOTIFICATIONS
HostNameTRC_STORED_PROCEDURESTRC_STORED_PROCEDURES
HostNameTRC_TSQLTRC_TSQL
HostNameTRC_USER_CONFIGURABLETRC_USER_CONFIGURABLE
HostNameUSER_ERROR_MESSAGEUSER_ERROR_MESSAGE

List of classes with HostName derived property in ROOT\Microsoft\SqlServer\ServerEvents\MSSQLSERVER namespace

propertyClassOrigin
HostNameDEPRECATION_ANNOUNCEMENTTRC_DEPRECATION
HostNameDEPRECATION_FINAL_SUPPORTTRC_DEPRECATION
HostNameOBJECT_ALTEREDTRC_OBJECTS
HostNameOBJECT_CREATEDTRC_OBJECTS
HostNameOBJECT_DELETEDTRC_OBJECTS
HostNameOLEDB_CALL_EVENTTRC_OLEDB
HostNameOLEDB_DATAREAD_EVENTTRC_OLEDB
HostNameOLEDB_ERRORSTRC_OLEDB
HostNameOLEDB_PROVIDER_INFORMATIONTRC_OLEDB
HostNameOLEDB_QUERYINTERFACE_EVENTTRC_OLEDB
HostNameQN__DYNAMICSTRC_QUERY_NOTIFICATIONS
HostNameQN__PARAMETER_TABLETRC_QUERY_NOTIFICATIONS
HostNameQN__SUBSCRIPTIONTRC_QUERY_NOTIFICATIONS
HostNameQN__TEMPLATETRC_QUERY_NOTIFICATIONS
HostNameSHOWPLAN_ALL_FOR_QUERY_COMPILETRC_PERFORMANCE
HostNameSHOWPLAN_XMLTRC_PERFORMANCE
HostNameSHOWPLAN_XML_FOR_QUERY_COMPILETRC_PERFORMANCE
HostNameSHOWPLAN_XML_STATISTICS_PROFILETRC_PERFORMANCE
HostNameSP_CACHEINSERTTRC_STORED_PROCEDURES
HostNameSP_CACHEMISSTRC_STORED_PROCEDURES
HostNameSP_CACHEREMOVETRC_STORED_PROCEDURES
HostNameSP_RECOMPILETRC_STORED_PROCEDURES
HostNameSQL_STMTRECOMPILETRC_TSQL
HostNameUSERCONFIGURABLE_0TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_1TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_2TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_3TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_4TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_5TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_6TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_7TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_8TRC_USER_CONFIGURABLE
HostNameUSERCONFIGURABLE_9TRC_USER_CONFIGURABLE
HostNameXQUERY_STATIC_TYPETRC_TSQL

Code samples for HostName property

The class BITMAP_WARNING is abstract and serves only as a base for new classes.

Get a Class as object

Short VB Script code to get the abstract class BITMAP_WARNING.
See in another language: C#, VB.Net.
'https://wutils.com/wmi/
Dim wmiClass, oProperty
Set wmiClass = GetObject( _
 "WINMGMTS:\\.\ROOT\Microsoft\SqlServer\ServerEvents\MSSQLSERVER:" + _
 "BITMAP_WARNING")

'get some class property 
Wscript.Echo wmiClass.properties_("HostName").Origin 'or other property name, see properties

'Check if the class is singleton
Wscript.Echo wmiClass.Path_.IsSingleton

'Get number of methods in the class
Wscript.Echo wmiClass.Methods_.Count

'List class properties
For Each oProperty In wmiClass.properties_
	'get property name and origin. Property value in the class is null, of course.
	Wscript.Echo oProperty.Name, oProperty.Origin, oProperty.Value
Next 

InstancesOf

List of all instances, wmi class BITMAP_WARNING.
'https://wutils.com/wmi/
Dim oWMI, Instances, Instance

'Get base WMI object, "." means computer name (local)
Set oWMI = GetObject("WINMGMTS:\\.\ROOT\Microsoft\SqlServer\ServerEvents\MSSQLSERVER")

'Get instances of BITMAP_WARNING - all instances of this class and derived classes 
Set Instances = oWMI.InstancesOf("BITMAP_WARNING")


'Enumerate instances  
For Each Instance In Instances 
  'Do something with the instance
  Wscript.Echo Instance.HostName 'or other property name
Next 'Instance
comments powered by Disqus
WUtils.com