Operations Manager 2007 Database Query Utility
Knowing how to pull informational data directly from the Operations Manager database and data warehouse can be a bit tricky, but a critical part of identifying and troubleshooting performance pain points as well as obtaining key informational data in the SCOM environment. To that extent, I have always leveraged the massively cool collection of SQL scripts on Kevin Holman’s website.
Now when I needed to run these queries, I would open up Kevin’s website, fire up SQL Management Studio, connect to the database, open a query window and then start pasting and executing. In order to put all that functionality into a single resource, I quickly threw together a executable that contains most of the queries on Kevin’s website as well as the ability to connect to the SCOM backends and dump the information into a DataGridView on a windows form. I also included basic functionality for the queries that were parameterized to take input from the form rather than modifying the queries in the SQL editor window.
First and foremost, I would like to thank Kevin (and give him full credit) for posting his queries that have proven helpful time and time again. I have included the compiled standalone executable in the links below as well as the source code. Feel free to modify the code in any way to suit your needs as you see fit. The SQL statements are simply embedded into a basic XML resource which can be easily modified to add new queries.
Hi alan,
Great tool thanks.
BTW I was getting an error “Request for the permission of type ‘System.Data.SqlClient.SqlClientPermission’…..failed” which was because I was running the tool from a UNC path. Copied the binary to a local path on the client and bingo
Thanks, glad you like it. This is due to something called code access security enforced by the common language runtime. I didn’t focus on modifying the security policy or strongly typing the assemblies to coincide with a security policy so this is to be expected.