cancel
Showing results for 
Search instead for 
Did you mean: 

How to know user detail

Former Member
0 Kudos

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....

Accepted Solutions (0)

Answers (1)

Answers (1)

msundararaja_perumal
Active Contributor
0 Kudos

Hi,

Use sp_who2 in the query manager.See whether the result satisfies you

Former Member
0 Kudos

i got list but can u help me in same..

how to filter tht list ?

Former Member
0 Kudos

Hi M. Sundararaja Perumal !

What 's sp_who2 ?

Could you explain!

Thanks!

msundararaja_perumal
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi!

Where 's sp_who2 is strore or we have to create this query.

If u have this query, please show me detail.!

Thanks!

msundararaja_perumal
Active Contributor
0 Kudos

Hi,

You are not the owner of this thread.

Pls post your query in separate thread.

Former Member
0 Kudos

Dear Tien,

sp_who2 is just like a Function or view or Stored Procedure.

You can run this command in SAP Query Manager or SQL QUery Window

Regards,

Thanga Raj.K