Blog Post

Connection strings and application name



There are many things that developers and DBA’s can do to help their relationships run smoothly, most of them are relatively simply things – as this tip is today.

DBA’s often have to track down problems – often performance related – and they tend to use profiler for the job.

When running profiler the name of the developer’s application will show up in he “Application Name” column.

This column is simply filled by taking the value of the “Application Name” attribute from the connection string.

Here’s an example of a connection string with the “Application Name” attribute in it.

Data Source=TheServer; Initial Catalog=TheDB; User Id=Username; Password=myPassword; Application Name=OurFancyApplication;

So now, what show’s up in the Application Name column of profiler is OurFancyApplication

Application Name is not a compulsory attribute in the connection string – so you can choose to leave it out, but if you do profiler will just display a generic value – .NET sqlClient Data Provider – in the Application Name column

Having the Application Name show the correct name of you app, is a big help to the DBA, especially when they are looking at a busy server, attempting to track down a troublesome connection.

So, if you’re a developer, please be kind to your DBA and include the Application Name attribute in you connection string.

In case anybody is looking for more information / examples about connection string, just look here.

Have a nice day



Related Posts :-  The developer / DBA relationship


You rated this post out of 5. Change rating




You rated this post out of 5. Change rating