Group members (DW)

/* Return Health Service instances hosting one or more instances contained in system.group */ USE OperationsManagerDW SELECT vManagedEntity.DisplayName AS Computer FROM  vManagedEntity INNER JOIN                vManagedEntityType ON vManagedEntity.ManagedEntityTypeRowId = vManagedEntityType.ManagedEntityTypeRowId WHERE (vManagedEntity.TopLevelHostManagedEntityRowId IN                    (SELECT DISTINCT ME1.TopLevelHostManagedEntityRowId                     FROM   vManagedEntity AS ME2 INNER JOIN                                    vRelationship ON ME2.ManagedEntityRowId = vRelationship.SourceManagedEntityRowId INNER JOIN                                    vManagedEntity AS…

0

All groups (DW)

Thanks to Daniel Savage for helping with this one. /* Get all groups from Data Warehouse */ USE OperationsManagerDW SELECT DISTINCT DisplayName FROM  vManagedEntity WHERE (ManagedEntityTypeRowId IN                    (SELECT ManagedEntityTypeRowId                     FROM   dbo.ManagedEntityDerivedTypeHierarchy                                        ((SELECT ManagedEntityTypeRowId                                          FROM   vManagedEntityType                                          WHERE (ManagedEntityTypeSystemName = ‘system.group’)), 0)))   Back to SQL queries main menu

0

Agents: remove configured management group or uninstall agent using command line

I had a question today about uninstalling an agent using the command line.  The options referenced here are great for installing, configuring and modifying an agent and all possible options.  Here are some additional notes that may come in handy, which supplements Rob’s excellent command line post. Beware of word wrap on these commands.  They…

5

Monitor the operations database grooming procedure (v2)

UPDATE: Monitoring the operational database grooming procedure is now included in the SCOM management pack since version 6.1.7672.0.  I will keep this post up as an example of how to create a monitor based on a script that queries a database. Okay, so it’s only been two days since I posted the original monitor.  But,…

0

Monitor the operations database grooming procedure

UPDATE: Monitoring the operational database grooming procedure is now included in the SCOM management pack since version 6.1.7672.0.  I will keep this post up as an example of how to create a monitor based on a script that queries a database. Often times we’re not aware of, or concerned about grooming in Operations Manager.  After…

1

Table size and record count

This was initially published by Kevin, and Steve added row count.  I just changed the column names and posted it here for easy access to customers I work with.  Anytime I engage in a tuning effort or a case where there are database issues, I first ask customers to run all queries on the main…

0

Command Shell Tab Expansion Delay

A few months ago, after re-installing my workstation operating system and getting all my applications and tools loaded, I fire up Operations Manager Command Shell.  Since I use the tab expansion function frequently, I noticed immediately that for some odd reason the Command Shell would paused for ~30 seconds every time I used the tab…

0

Event data, views and grooming

Every day I have a number of fleeting thoughts that I hope every Operations Manager administrator knows.  With all the emerging blogs about Operations Manager over the past year offering up a wealth of knowledge, sometimes I assume the majority of these fleeting thoughts are common knowledge.  I’m going to stop assuming, and start writing….

0

Groups and related information

Return state of a group foreach($a in get-monitoringobjectgroup){if($a.DisplayName -eq "group name"){$a.HealthState}} Return contained instances of a group and state of each instance foreach ($group in get-monitoringobjectGroup) {if($group.DisplayName -eq "group name") {$group.GetRelatedMonitoringObjects() | ft DisplayName,HealthState}} Return management pack a group is stored in ForEach ($Group in get-MonitoringObjectGroup) {If ($Group.DisplayName -eq "group name") {get-MonitoringClass | where {$_.Id…

1

Number of alerts raised per day for last 28 days

/*Number of alerts raised per day for last 28 days.*/ USE OperationsManagerDW SELECT CONVERT(VARCHAR(10), DBCreatedDateTime, 101) AS Date, COUNT(*) AS Alerts FROM  Alert.vAlert WHERE (DBCreatedDateTime BETWEEN DATEADD(day, -27, GETDATE()) AND GETDATE()) GROUP BY CONVERT(VARCHAR(10), DBCreatedDateTime, 101) ORDER BY Date DESC Back to SQL queries main menu

2