Is it possible to get the client process ID of an application that runs on SQL server?

Posted by Andrea.Ko on Stack Overflow See other posts from Stack Overflow or by Andrea.Ko
Published on 2010-06-02T01:33:38Z Indexed on 2010/06/02 1:43 UTC
Read the original article Hit count: 439

Filed under:

Hi all,

For my VFP application, i have a program to check currently who is accessing the server (by using sp_who2), also another progam to check who is currently locking which table.

But i wish to know which options my users is accessing at the moment. Am thinking if i can write a SP to get the current connected process ID for a specific client, and insert to a table(ActLog) in SQL with the program name pass into this table during users load the program. And delete that particular record when user unload the program.

Then from the ActLog, i can know who is currently accessing to which program. At the moment, i wish to know if i able to get the client process ID?


© Stack Overflow or respective owner

Related posts about sql-server

Related posts about vfp