Sidebar monitoring of SQL databases

A while back I discussed using the Windows Vista Sidebar to display useful information about applications. This led to other conversations, including one with fellow SQL MVP (and Leeds United fan – sorry to hear about the 15 points, mate) Jamie Thomson about monitoring important SQL database statistics using sidebar gadgets. I didn’t give it much thought, because I still had my PowerGadgets solution in place, monitoring all kinds of things based on my own queries. (Personally, I like using ‘union all’ queries. This lets me get a nice collection of numbers for showing in a graph. But I also find that … Continue reading Sidebar monitoring of SQL databases

sys.database_files and sys.master_files (rather than sys.sysfiles)

Whenever there are changes, people can be slow to embrace them. One I’ve come across recently is that looking in sysfiles is no longer the best way of getting information about your database files. sys.database_files will tell you a lot more about them, and give you much nicer ways of filtering them. So for example, if you want a list of the log files for your database, try: select * from sys.database_files where type = 1 And sys.master_files will list them for the whole system. So it becomes really easy to look at the state of things from within T-SQL. … Continue reading sys.database_files and sys.master_files (rather than sys.sysfiles)

Cricket PowerGadget

I was thinking about PowerShell and how you can get it to do fantastic things. And I wondered how easily it could be used for scraping cricket scores. So I threw together four lines of code to grab the cricket scoreboard from cricinfo and rip out the title. $ret = (new-object Net.WebClient).DownloadString(“;wrappertype=mainframe”)$titlestart = [Regex]::Matches($ret,”<title>”,”IgnoreCase”)[0].Index$titleend = [Regex]::Matches($ret,”</title>”,”IgnoreCase”)[0].Index$ret.Substring($titlestart+7,$titleend-$titlestart-7) Edited: This can be done easily in one line – Lars pointed out the use of Regex to grab the section between the title tags, which then means we don’t need to store $ret at all. It can now be: [Regex]::Match((new-object Net.WebClient).DownloadString(“;wrappertype=mainframe”),”<title>(.*)</title>”,”IgnoreCase”).Groups[1].Value It’s not … Continue reading Cricket PowerGadget

PowerGadgets maps

I’ve been told that it’s quite easy to create your own maps for PowerGadgets, and I plan to give it a try some time soon. If you’re in the US, it’s already very easy to throw together a map of the US which charts the states that have had sales. And in the Advanced Properties window you can add conditional formatting very easily to change the colour according to the range. Easy to script for PowerShell commands too. Of course, if you’re not in the US, then you may want to make your own custom map to show where things … Continue reading PowerGadgets maps

Application monitoring in 20 seconds with PowerGadgets

Performance Monitoring is great, but unless you’ve made a bunch of custom monitors, it doesn’t really tell you the health of your application. Well, not completely. For example, take wHooiz – Cameron and Clarke’s profile tool. I’m sure they have various things running to to persuade them that their system is ticking along nicely. But that doesn’t tell them whether their marketing is working. It doesn’t tell them if their application is actually happy and successful. There may be no 404s in site, but if no-one is using the thing, then they’re failing. Luckily for them, they seem to be … Continue reading Application monitoring in 20 seconds with PowerGadgets