Skip Navigation LinksHome > View Post
SQL Profiler with .NET

I often use SQL Profiler to get an idea of what SQL is being launched by a .NET application. The Application Name defaults to ".NET SqlClient Data Provider" which means that if you have several applications running using ADO.NET, you can not distinguish the trace log by looking at the application name.

To get round this, simply add an "Application Name" attribute to your connection string. See example below:

Data Source=servername;Application Name=The Wicked Web App;Initial Catalog=Database Name;User ID=theuser;Password=pwd

Refer to this article about the SqlConnection.ConnectionString Property.

Tags: SQL

Bruusi Post By Bruusi
11:20
15 Nov 2005

» Next Post: Better understand Cookies with ieHTTPHeaders
« Previous Post: Case insensitive dictionaries and hashtables

Comments:

Post a comment:

Name  

E-mail (never shared)

URL

Comments  

Captcha ImageRefresh Image
What's this?
Enter code above