Solved

Application Names

Posted on 2012-03-13
3
293 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
  • 2
3 Comments
 
LVL 69

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 69

Accepted Solution

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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now