on 01-06-2015 12:25 PM
Hello Experts,
we are using SAP B1 2007 PL15 here i enable to find which user is in which database. for ex. i had two DBs one is LIVE and another one is TEST here my concern is how to find out which user is login in which database?
Thanks in advance ..
Umamahesh.
Hi,
Run below query in test or Live DB in query generator
SELECT distinct T0.[U_NAME], T1.[Action], T1.[ActionBy], T1.[Date], T1.[ClientName], T1.[ClientIP] FROM SBOdemoUS.DBO.OUSR T0 INNER JOIN SBOdemoUS.DBO.USR5 T1 ON T0.USER_CODE = T1.UserCode where T1.[Action] = '[%0]' and datediff(dd,T1.[Date],getdate()) = 0
union all
SELECT distinct T0.[U_NAME], T1.[Action], T1.[ActionBy], T1.[Date], T1.[ClientName], T1.[ClientIP] FROM TEST.DBO.OUSR T0 INNER JOIN TEST.DBO.USR5 T1 ON T0.USER_CODE = T1.UserCode where T1.[Action] = '[%0]' and datediff(dd,T1.[Date],getdate()) = 0
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
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.