在Sql Server Profiler中更改应用程序名称

Dan*_*and 7 sql-server connection-string sql-server-profiler

在SQL Server Profiler中分析.Net应用程序时,默认的应用程序名称来自数据提供程序.如何将其更改为我自己的应用程序名称?

Dan*_*and 21

只需添加Application Name=My Application;到Connectionstring即可

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

你也可以使用 App=My Application

  • @MichealChoudhary我刚刚在SQL Server 2016 Developer中尝试了此操作,没有任何问题。应用程序名称出现在SQL Profiler中。 (2认同)
  • 在SQL Server 2017和Management Studio中为我工作18 (2认同)