Rusty Divine

Live, Love, Learn, Teach

Time Lapse of Crane at NDOR Bldg 1500

Today a crane lifted some heavy HVAC equipment onto the roof of our building at work! The window on the third floor by my desk provided a good view, and what better way to capture it than a nice time lapse video.

Hope you enjoy!

Time Lapse at NDOR

SQL Server Profiler Templates and How To Isolate My Database Calls from Others on my Team

Sometimes a time-saving feature is right under your nose for years. One example for me was the ability to save my SQL Server Profiler configuration and set it as the default template. I hope you find it useful!

Selecting a Base Template

After opening Profiler and connecting to a database a “Trace Properties” window will present itself for entering the trace details. To make a custom template, select any of the templates form the “Use the template” drop down and give it a Trace name like “{My Database} Standard Trace”.

When I run profiler, I am almost always just checking for excessive database calls (especially n+1 selects) or troubleshooting TSQL or stored procedure calls. Sometimes I’m running the trace on a development server that has multiple databases or users and I want to isolate it to just my calls. For me, “TSQL_Duration” a good starting point for a standard template.


Configuring Events and Filters on the Template

Next, click on the Events Selection tab to configure events to listen for:


Be sure to check the “Show all columns” checkbox. This is important because if the column isn’t visible in this events grid, then you can’t filter by it in the Column Filters tool.

Next, click on the Column Filters button and filter out any events from other databases on this database server (use the percent sign % as a wildcard here):


Occasionally I will also change the login name in my app’s connection string so that I can isolate just my connections by adding a filter on the “LoginName” column.

Click the Run button to try it out. To make changes to the columns and filters, be sure to stop the trace first, then click on the properties icon in the tool bar.

Saving and Exporting a Template

Once satisfied with the trace template, select File > Save As > Trace Template and enter the template name like “{My Database} Standard Trace”. The next time you start a trace, it will be in the drop down list of templates. You can also select File > Templates > Export Template to save it to a file and share it with your team.

Setting a Template to the Default Template

Setting the default template will save a few clicks each time you use Profiler. Select File > Templates > Edit Template. Choose the template from the drop down list, and then check “Use as default template..”


Final Thoughts and Other Options

A good code review should also check out the traffic hitting the database for the code under review. It is so easy to stop coding once something “works” and not consider how it will scale. Checking in with profiler is especially important if your project is using an ORM with lazy loading turned on.

I would not recommend running SQL profiler on a production database because it takes a significant amount of resources. If you do need to do something like this, consider whether there is another tool that would be safer.

I would also encourage you to consider the following tools in your web project:

The Leader’s Guide to Speaking with Presence

“The Leader's Guide to Speaking with presence: How to Project Confidence, Conviction, and Authority”, by John Baldoni.

The Big Idea:

There are a few guidelines when creating a speech or presentation that will help make it worth the audiences’ time to attend. Keeping these in mind while creating, revising, practicing, and delivering a presentation will make the most impact for the message.

This book also briefly discusses tips for improving leadership through communication, mediation, and active listening.

Book Notes:

This guide is very concise – many of the ideas are covered with just a paragraph or two and some of the leadership advice isn’t much more than some bullet points. I do appreciate brevity and was not disappointed because the advice is quite good and makes a great reference.

Tips on Speaking

John describes what it takes to deliver an effective presentation. Here are some highlights:

  • Structure speeches like a composition - with opening (attention grabber), pitch (make music worth listening to), rhythm (pace), pause (if you do nothing else in your next speech, pause), closing.
  • Know well what you are going to say and what's coming next and the context so that you can diverge from the memorized script.
  • "Metaphorical handshake" - make personal contact with audience by smiling, relaxing, being at ease. Acknowledge them before you launch and break the ice with a brief personal comment.
  • Make the audience feel welcome, as if you have invited them into your home and want them to enjoy the evening - they want you to succeed. It's good to think of it like your home; you own the stage and can help them have a good time.
  • Good posture is important for conveying what you are saying is important to you and that you want people to consider it. Practice breathing regularly.
  • Don't undercut your message with self-effacing quips about poor quality of your slides or audio. Lead the presentation through any difficulty by being able to describe the message.
    • Don't read your slides - just show the concept on the slide through a few words or pictures and fill in the rest with your speech.
  • An entertaining speech can be more memorable, especially if you can wrap your main message in a summary that is humorous.
    • A story is a very good vehicle for getting a message across, too.
  • Tailor your optimism so that you consider the possibility for set backs so that you rebound gracefully
  • Consider what you would want your audience to think or do after hearing your speech when revising it.
  • Restate questions so everyone can hear. Handle objections by acknowledging their merit and it's ok to say you don't know, but will deliver an answer later. Always tell the truth.

Tips on Leadership

John also has some advice for leading teams. Two pieces resonated with me:

  1. Develop your elevator speech for every single key issue, and
  2. Refrain from voicing your opinion first because it may color the opinions of your team.

The first reinforces something I’ve been considering as an app that I could make to help keep short bits of information at easy recall with mnemonic techniques, and the second as part of my effort to encourage more participation on the software development team I’m a member of.

Related Material:

In addition to this book, I also recommend:, How To Win Friends and Influence People, and JohnScott’s presentation and guides to technical speaking (also on Pluralsight).

Tools: impress.js, zoomit, onslyde, slideshare, animoto, archives