OK first real post on this new blog.
This is a set of tutorials and sample MPs I wrote a while back. This has come up on a number of threads recently with people trying to use scripts to query SQL. There is a better way! You can use the OLEDB data source module type in SCOM to give you a much easier time. The downside is there are not a huge number of predefined composite module types / monitor types that are ready to go so you need to invest a little in building your workflows. These docs and samples give you a full run down of discovery and monitoring using OLEDB.
This is broken down into two tutorials:
The zip file contains the finished MPs and a full walkthrough of the tutorial (PDF format)
Enjoy!