database_segment_id - property in ROOT\WMI namespace

database_segment_id in other namespaces

List of classes with database_segment_id local property in ROOT\WMI namespace

propertyClassOrigin
database_segment_idadd_file_in_masteradd_file_in_master
database_segment_idadd_file_rollbackadd_file_rollback
database_segment_idall_database_segment_files_attachall_database_segment_files_attach
database_segment_idall_files_createdall_files_created
database_segment_idbrick_files_metadata_remapbrick_files_metadata_remap
database_segment_iddatabase_bootpage_syncdatabase_bootpage_sync
database_segment_iddatabase_migrate_to_matrixdatabase_migrate_to_matrix
database_segment_iddatabase_opendatabase_open
database_segment_iddatabase_segment_all_files_createdatabase_segment_all_files_create
database_segment_iddatabase_segment_creation_begindatabase_segment_creation_begin
database_segment_iddatabase_segment_creation_enddatabase_segment_creation_end
database_segment_iddatabase_segment_local_creation_begindatabase_segment_local_creation_begin
database_segment_iddatabase_segment_local_creation_enddatabase_segment_local_creation_end
database_segment_iddatabase_segment_state_changedatabase_segment_state_change
database_segment_iddatabase_segment_state_change_notificationdatabase_segment_state_change_notification
database_segment_iddbtable_options_refreshdbtable_options_refresh
database_segment_iddelete_or_mark_filedelete_or_mark_file
database_segment_iddrop_file_committeddrop_file_committed
database_segment_iddrop_file_prepareddrop_file_prepared
database_segment_iddrop_file_rollbackdrop_file_rollback
database_segment_idfile_added_in_databasefile_added_in_database
database_segment_idfilegroup_name_changefilegroup_name_change
database_segment_idfilegroup_property_changefilegroup_property_change
database_segment_idmodify_file_namemodify_file_name
database_segment_idmodify_file_operationmodify_file_operation
database_segment_idphysical_filegroup_createphysical_filegroup_create
database_segment_idrecovery_in_physicalrecovery_in_physical
database_segment_idrecovery_in_rollbackrecovery_in_rollback
database_segment_idrecovery_unit_file_metadata_copyrecovery_unit_file_metadata_copy
database_segment_idrecovery_unit_metadata_createrecovery_unit_metadata_create
database_segment_idrecovery_unit_metadata_truncate_data_droprecovery_unit_metadata_truncate_data_drop
database_segment_idvalidate_filevalidate_file

Code samples for database_segment_id property

Get instance of WMI class using GetObject, database_segment_id property of database_open

Short VBS code - get a single specified instance of database_open 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\WMI:" + _
 "database_open.PropertyName=""SomeText""")
Wscript.Echo wmiObject.database_segment_id 'or other property name, see properties
See more VBS samples of database_open class

WMI query - sample windows WQL with C#, database_segment_id property of database_open

Get a specified instance of database_open 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\\WMI");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM database_open Where PropertyName=\"SomeText\"");

//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("database_segment_id : {0}", m["database_segment_id"]);
  
}

WMI query - sample windows WQL with VB.Net, database_segment_id property of database_open

Get a specified instance of database_open 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\WMI")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM database_open Where PropertyName="SomeText"")

'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("database_segment_id : {0}", mObject("database_segment_id"))
Next
comments powered by Disqus
WUtils.com