Geeks With Blogs

Tiago Salgado .NET / SQL Server / IT / etc...

When I am working on some project, it is normal to need to analyze the queries that are executed on the database to detect a possible bug or something that is not matched with what I expected.

For this, SQL Server Profiler gives me a good and quick overview of what is being requested for each connection to the database.

The case of a registration in the profiler can be shown as:



As can be seen in the Application Name column has the value ".Net Sql Client Data Provider", which makes it very difficult in filtering to only the application that we intend to analyze the data.

To avoid this, we only need to indicate on ConnectionString, the name of our application, and everything gets easier.

"Data Source=localhost;Initial Catalog=MyDatabase;
Integrated Security=True;Application Name=MyAppName"

After that, we get something more friendly like:

Posted on Wednesday, May 11, 2011 10:51 PM | Back to top

Comments on this post: Application Name on ConnectionString

# re: Application Name on ConnectionString
Requesting Gravatar...
This is a very good article, I think there will be many people like it, of course, I was one of the people. I think this article increase my knowledge. it is nice to know this. Thanks for the time and effort. It is well appreciated. More to come.Good share,you article very great, very usefull for us…thank you
Left by Michael Vick Jersey on Oct 15, 2011 7:08 AM

# re: Application Name on ConnectionString
Requesting Gravatar...
Really good reading for me, I must suppose that you are one of the best blogger have never saw. Thanks for the publication of this informative articl thank you quotations
Left by finasteride proscar side effects on Mar 19, 2012 2:50 PM

Your comment:
 (will show your gravatar)

Copyright © Tiago Salgado | Powered by: