on 06-12-2009 10:45 AM
Dear Expert,
There are many user login with same ID,for every user there are max two session , My question is I want a query through which i may know a particular user is accessing 1 session or already two session are active
Eg
user name :: session activated
abc ::1
manager ::1
xyz ::2
pqr :: 2
I know thru a license v can know activate but could find the sessional ....
Hope it tuff job bt nt like impossible in today world....
Hi,
Use sp_who2 in the query manager.See whether the result satisfies you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reply To Kevin Shaw:
No data is stored in any of the tables to retrieve through query according to your exact requirement.
So no alternate solution is present is b1
Reply To Tien Le :
sp_who2 is a internal procedure allows users to view current activity on the database. This command provides a view into several system tables.
It returns following information
Spidu2014The system process ID.
statusu2014The status of the process (e.g., RUNNABLE, SLEEPING).
loginameu2014Login name of the user.
hostnameu2014Machine name of the user.
blku2014If the process is getting blocked, this value is the SPID of the blocking process.
dbnameu2014Name of database the process is using.
Cmdu2014The command currently being executed (e.g., SELECT, INSERT)
CPUTimeu2014Total CPU time the process has taken.
DiskIOu2014Total amount of disk reads for the process.
LastBatchu2014Last time a client called a procedure or executed a query.
ProgramNameu2014Application that has initiated the connection
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.