5

Add application name by default in connection string

I'm trying to debug an error with incremental loads and for this I have been using the built-in SQL server Extended Events functionality.

Given that Discovery Hub does not pass its name to the SQL server I see client_app_name as ".Net SqlClient Data Provider" so I have to use the PID to see that it was TimeXtender who fired a request and not a user / developer / other application against the DWH.

Turns out you can simply pass an application name in the connection string:

https://www.connectionstrings.com/use-application-name-sql-server/

Which gives you this:

So please add "Discovery Hub <version>" by default as the application name for all connections made to any db, whether this is to the projectRepository, to the BU / DWH database, to different Microsoft SQL source DBs from the GUI.

If possible, change the name to "Discovery Hub Scheduler <version>" when running a scheduled package and "Discovery Hub Command Line <version>" when launching a package via the command line or a shortcut you created for an execution package and "Discover Hub XML Export <version>" for auditing who exported XMLs.

SQL DBAs will love you for it as well!

1 comment

Please sign in to leave a comment.