Building SQL queries
This recipe will describe the steps you need to build a SQL query that will extract application information from your SCOM databases. This method can be used to collect other information from the databases to suit your organizational needs.
In this recipe, we will look at scenarios for which we require data to be extracted from our environment using SQL queries.
This scenario will demonstrate how you can retrieve a list of distributed applications from your environment and identify the health status of each.
Getting ready
The preparation for this recipe is to ensure you have the appropriate access to read your SCOM databases and access to SQL Server 2012 Management Studio.
How to do it...
Perform the following steps to build, test, and save your SQL query:
Start SQL Server 2012 Management Studio and connect to the SQL server where your Operations Manager database resides.
Expand the Databases node on the Object Explorer pane to see your Operations Manager databases in the tree...