Pages Menu
TwitterRssFacebook

Posted by on Jun 15, 2011 in Development

Give your SQL Strings Names!

Give your SQL Strings Names!

This is such a useful debugging practice I had to share it. How often have you come to debug a problem and had to resort to SQL Tracing to pinpoint the problem, or had to use SQL’s Activity Monitor to try and find the problem? Ever fired up the Process view (usually when everything is going wrong and you need answers NOW!) and found this:

So…which one of your 20-odd .NET applications/services/web services should you be looking at?

Ben Hall’s Blog has a good post on using Application Name in SQL Connection strings to differentiate different connections and, therefore, applications. There’s not much point in me repeating it, so please go read it now.

Please do this. Go back and do it now. You will thank your former self in the future. Curse loudly at colleagues when you come across instances when it hasn’t been done.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.