Change Application Name in Sql Server Profiler
Asked Answered
T

1

22

When profiling a .Net Application in SQL Server Profiler the default Application Name is taken from the Data Provider. How can I change this to my own Application Name?

Tuberculate answered 26/11, 2014 at 10:50 Comment(0)
T
43

Just add Application Name=My Application; to the Connectionstring

Example: connectionString="Server=mySqlServer;Initial Catalog=myDatabase;User id=aUser;Password=aPassword;Application Name=My Application;"

You can also use App=My Application

Tuberculate answered 26/11, 2014 at 10:50 Comment(5)
@MichealChoudhary I just tried this with SQL Server 2016 Developer and had no issues. The application name appeared in SQL Profiler.Monotone
Worked for me in SQL Server 2017 & Management studio 18Alvinia
in a website asp.net webform fails The requested database does not have a valid ADO.NET provider name set in the connection string.Matri
If I use Application Name=, then I get a message from the driver (Native Client 11, and ODBC 17) telling me Invalid connection string attribute. However, APP= seems to work in most cases? docsEndorse
Valid content of the connection string is highly dependent on which Data Provider you use. Please have a look at, for example, connectionstrings.com/sql-server for examples that you can use.Eclampsia

© 2022 - 2024 — McMap. All rights reserved.