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.