Search


Sponsors

Manually Quering Opsmgr Database pt2

Operations Manager 2007 In a previous post I found out the way to do basic queries to the opsmgr database. I got a request on what to do with two different objects with the same name. For example two SQL servers hosting a database with the same name. There is no way to distinguish them with my previous query.
I found the following query would do the trick;

SELECT MEG.[Displayname] AS Object, LEFT(MEG.[PATH], CASE WHEN charindex(';' , MEG.[PATH]) > 0 THEN charindex(';' , MEG.[PATH]) ELSE 1 END - 1) AS Server, TMV.[Name] AS MonitoringClass, MEG.[Healthstate] FROM dbo.ManagedEntityGenericView AS MEG
INNER JOIN dbo.[ManagedTypeView] AS TMV
ON TMV.[id] = MEG.[MonitoringClassId]
WHERE MEG.[Displayname] = ''
AND TMV.[Name] = 'Microsoft.SQLServer.Database'



  
Remember personal info?

Emoticons / Textile

Before sending a comment, you have to correctly answer a simple question you know the answer to. This is a countermeasure against automated spam bots.
 

  ( Register your username / Log in )

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.