Along with the SQL Server, Database, Username and Password, don’t forget to include the Application Name in your connection string. It’s an optional parameter, but it can be a lifesaver.
Consider this example: There are multiple .NET applications running on a single web server. Each application shares a common SQL Server Server which is suddenly performing very poorly. You are tasked with determine which of the applications is causing havoc. You launch SQL Profiler and run a trace. Since you have included the optional parameter in your connection string, you may now filter the application specific queries and troubleshoot the problem far more effectively. If you hadn’t specified the application name, you would have some work ahead of you. In this case, all of the queries would have had a generic app name, .NET sqlClient Data Provider, and that isn’t very helpful, is it?
Do yourself a favor and be sure to add this practice to your coding standards…