• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 140
  • Last Modified:

Best methodology for determining who is using a shared SQL database.

Client has an application with an executable that may be run from anywhere - no registry footprint at all.  Need to determine who is in the application.  The back end SQL database is shared among all users.
3 Solutions
Vitor MontalvãoMSSQL Senior EngineerCommented:
You can run the following query that returns all actual connections.

Open in new window

The ProgramName column should inform you who's connected by the application.
Aneesh RetnakaranDatabase AdministratorCommented:
if the application is directly connecting to sql (not using an application /web server ) then, yoi can run sp_who2 and see the host name
ste5anSenior DeveloperCommented:
Need to determine who is in the application.

This is not possible. Cause Currently connected and who is in the application are two different things. Maybe in reality nearly the same and sufficient, but not congruent.

But the others already showed you how to determine who is currently connected to your SQL Server database.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now