In my connection strings I add Application Name=XX so I can identify from the SQL server where a process is coming from (sp_who2 – ProgramName column). This works great when connecting from .NET. When I connect through Classic ASP using Server.CreateObject(“ADODB.Connection”), my ProgramName is identified by SQL Server as “Internet Information Services”.
Does anybody know of a way to configure something (connection string? IIS? sql?) so SQL Server sees my Application Name?
Just add this param:
Here is an example. I wouldn’t suggest using a DSN or the old fashioned {SQL Server} drivers unless you’re really using SQL 2000 or earlier.
You may not have the most recent version of SQL Native Client, so you may need to fall back to the version-independent provider name:
If you don’t have SQL Native Client installed, you can install it from here ( x86 | x64 ), or fall back to OLEDB:
I tested all three connection strings above and validated that Profiler (ApplicationName), sp_who2 (ProgramName) and sys.dm_exec_sessions (program_name) showed “my funky chicken.”