Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Is it possible -- does a perfmon counter exist -- that would show the name of the end-user application that is connecting to SQL Server?

share|improve this question
3  
How to Log Activity Using sp_whoisactive will be useful. –  Kin May 19 at 16:54

1 Answer 1

up vote 5 down vote accepted

There is no perfmon counter that would you show you this information. Why don't you just pull this directly from SQL Server (at least as how SQL Server sees it)?

select
    session_id,
    program_name
from sys.dm_exec_sessions
where is_user_process = 1;

If you're looking for data collection, you can periodically run this and store the output of the above query (or a variation of it, maybe with aggregating by program_name instead of grabbing session_id, depends on really what you're looking for) with a datetime stamp for subsequent querying.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.