Home
Do you add the Application Name in the SQL Server connection string?
  v1.0 Posted at 27/04/2018 7:05 AM by Tiago Araujo
You should always add the application name to the connection string so that SQL Server will know which application is connecting, and which database is used by that application. This will also allow SQL Profiler to trace individual application which helps you monitor performance or resolve conflicts.

​<add key="Connection" value="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Biotrack01;Data Source=sheep;"/>

Bad example - The connection string without Application Name

<add key="Connection" value="Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=Biotrack01;Data Source=sheep;
Application Name=Biotracker"/> // Good Code - Application Name is added in the connection string.​

​​Good example - The connection string with Application Name​

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments:

    Note: Social Media login for Yotpo is not working in IE or Safari, please use Chrome. We are waiting for Yotpo to fix it.