Repository navigation
Must APP be a reserved keyword in connection strings? #484
Description
Activity
Hi oscarrobertson, thank you for opening this issue!
Our team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.
If you have additional information to share, please feel free to update the issue.
Thank you for your patience!
- addedtriage neededFor new issues, not triaged yet.For new issues, not triaged yet.
on Mar 23, 2026 - addedquestionFurther information is requestedFurther information is requestedand removedtriage neededFor new issues, not triaged yet.For new issues, not triaged yet.
on Apr 2, 2026 - assigned and unassigned
on Apr 9, 2026 sumitmsft commented
on Apr 11, 2026 ContributorMore actionsHi oscarrobertson - thanks for raising this, it's a valid question.
The APP keyword is reserved because mssql-python uses it to set the application identifier to
MSSQL-Pythonin every connection. This serves one fundamental purpose:
Telemetry & diagnostics: It allows our team to track driver adoption and usage patterns across SQL Server instances, which helps us prioritize investment and improvements for the Python driver.We understand this is a limitation for users who rely on APP to identify their own applications in sys.dm_exec_sessions, SQL Server Profiler traces, or similar monitoring tools. We appreciate the feedback and recognize this is a legitimate use case.
We'll track this as a feature request. Thanks again for the feedback!
- addedenhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on
on Apr 11, 2026 Thanks Sumit Sarabhai (@sumitmsft) - telemetry across our estate is basically exactly what we'd want to use it for also! A quick fix/compromise might just tacking what you need on to the the app string after it's been set by the user or something.
sumitmsft commented
on Apr 13, 2026 ContributorMore actionsThanks for the clarification oscarrobertson I can understand your use case and that there would be other customers as well who may be using application name to get telemetry data for their estate.
The idea of allowing a user-specified suffix (application name) that gets appended to the driver name (MSSQL-Python), which would make application_name as "MSSQL-Python - YourAppName" sounds reasonable to us.
Please allow us sometime to triage this change. We will get back once we have confirmation on this. Hope that helps!
- Sumit
Reacted by Gord Thompson and oscarrobertson- removedwontfixThis will not be worked onThis will not be worked on
on Apr 14, 2026 imho, the jdbc mssql driver handles this the best. the driver version shows up in sys.dm_exec_sessions under "client_interface_name" as values like "Microsoft JDBC Driver 13.2".
Having the version number is very helpful in identifying drivers with CVE's, etc.
is it possible to override the generic "ODBC" with something like "ODBC 18.0 / mssql-python 1.6.0" ?
if not (due to ODBC driver limitations), then allowing the "YourAppName" suffix for "App=" as described above is acceptable.
Reacted by oscarrobertson- addedarea: connectivity-authConnection lifecycle, Entra/SP/NTLM auth, tokens, TLS, conn-string parsing, Fabric endpoints.Connection lifecycle, Entra/SP/NTLM auth, tokens, TLS, conn-string parsing, Fabric endpoints.
on Jun 4, 2026 - removedquestionFurther information is requestedFurther information is requested
on Jun 29, 2026
Hi, the library currently enforces APP as a reserved keyword in connection strings https://github.com/microsoft/mssql-python/wiki/Connection-to-SQL-Database#reserved-connection-string-keywords
Is there a good reason for this? I don't see any justification in the PR 8ed531e (although there is reference to docs/connection_string_allow_list_design.md which I cannot find)
We use currently use APP internally for passing application names and find it quite useful!