SQL Profiler templates

Way back when I was using the 2000 version of SQL Profiler I would always apply a filter to restrict my profiling by database id. On busy servers it’s simply the only way to fly. When I moved to using the SQL 2005 version of profiler I was quite shocked to find this option wasn’t visible. I did a bit of searching, but found nothing, and was in a hurry to get my profiling done - so I gave up.

Whenever I’m using profiler there’s usually a problem, which usually means there’s some time pressure, so it’s not the best time to run off playing keyword bingo with google. I’ve asked a few people who use profiler a lot more than me if they had any idea where the setting went, and they didn’t.

Yesterday I found that the option to restrict by database (and in 2005 it can be done by id or by name – no more select * from master..sysdatabases for me!) is still available! It’s just very well hidden.

It seems that it’s now available in the Templates section – File / Templates / New Template, choose a template to inherit from, then head to the “Events Selection” tab. Select column filters, and you should see a lot more options there than usual. Add your filter for the id or name, save, and you’re away.

Interestingly if you go back and edit this template, then you can no longer see those advanced options – they can only be setup and viewed when the template is first created. Seems a little weird, but really I’m too pleased to have found the option to feel the need to debate the finer point’s of Microsoft’s UI design.

Posted on Thursday, June 12, 2008 5:29 PM | Miscellaneous SQL

Like this? Share it!

No comments posted yet.

Post a comment
Please add 2 and 8 and type the answer here:
Remember me?
Ensure the word in this box says 'orange':