Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Application Names

Posted on 2012-03-13
3
Medium Priority
?
315 Views
Last Modified: 2012-06-21
Hi everybody! I need to get the application names that map to our SQL databases. I can get a lot of information using sys.sysprocesses and the connections/sessions DMVs, but the program name will be .Net SqlClient Data Provider, which doesn't tell me the specific app name. I can select app_name() to retrieve the current application, which gives me the info I want, but I want it for all processes. I'd obviously like to do this in T-SQL but am open to capturing this using VB. Any help would be most appreciated.
0
Comment
Question by:npawlowski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37714511
you can add "Application Name=YourAppName" to your application's connection string and it will reflect in SQL
0
 

Author Comment

by:npawlowski
ID: 37715361
So, when I see .Net Sql Client Data Provider in the sys.sysprocesses.program_name field, it's because the "Application Name=YourAppName" was never added to the connection string? This means that the app team is going to have to do this for all of the apps?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 37715658
no it only means that this property has not been set (it is the default value)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question