Share via

SQL query to extract SCOM Agent attributes

SajMoh 0 Reputation points
2025-04-02T15:25:08.2466667+00:00

We have a requirement to extract the below attributes of a SCOM agent and output to CSV file. Please assist in providing the SQL query to use to query the OperationsManager DB.

Name = Device Hostname

Class = Windows or Unix

Vendor = ‘BLOGGS – EUCS’

Serial Number =

Asset tag = If available

FITS Code = Needed

Manufacturer = Needed

Model ID = Manufacturer + Model

Status = In Use | In Maintenance (offline)

Comments = Free Text

Description = Free Text (value comments)

FQDN = Where possible

Virtual = Needed

Environment = Production

Operating = device OS

Much appreciated. Thanks.

System Center Operations Manager
System Center Operations Manager

A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.

0 comments No comments

1 answer

Sort by: Most helpful
  1. XinGuo-MSFT 22,271 Reputation points
    2025-04-03T07:13:54.0533333+00:00

    Hi,

    Below is an example of a SQL query that mines a specified attribute from an OperationsManager database, then we can join the tables with the master key BaseManagedEntityId and output them to a CSV file.

    select * from INFORMATION_SCHEMA.TABLES
    where TABLE_NAME like '%Maintenance%'
    
    select * from INFORMATION_SCHEMA.COLUMNS
    Where COLUMN_NAME like '%Maintenance%'
    
    
    select DisplayName,PrincipalName,* from MTV_Microsoft$Windows$OperatingSystem
    
    select IsVirtualMachine,* from MT_Computer
    
    select * from MT_Microsoft$Unix$Computer
    
    select * from MaintenanceMode
    
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.