DataChomp

Chomping At The Bits

Application Connection OCD

Do you have this problem:

 

Multiple connections from various applications and you don’t know which is which.  There is a fix to this.  It involves telling the app dev team to create a nice clean connection string with the Application Name property being set. This gets double awesome when you add the hostname to the application name so you know exactly where in the webfarm something is coming from.

Here is an example:

< connectionStrings> 
<add name="PaymentsConnStr" connectionString="Data Source=SuperServer;Initial Catalog=DB_Name;MultipleActiveResultSets=True;Persist Security Info=True;User ID=user1;Password=password1;Application Name=OCD App;" providerName="System.Data.SqlClient"/>
</connectionStrings>