chiahy
11th July 2005, 06:01
From licmon we can see can active user, from bshcmd we can know what session user are using. Is there anyway we can check user current active in which company?
Thank you.
NPRao
12th July 2005, 00:18
bshcmd gives the session started in a company.
>bshcmd6.2 -p -s -u 10 -w 10 29678
B:0000000:::(00003):Received wakeup call
B:0000001:::(00003):
Command 1 (arg '') issued by user nprao
B:0000002:::(00003): PID PPID PGRP SESSION TICKS FLAGS S CMP MEM
B:0000003:::(00003): 1 0 1 ttstpoledaem 146 01000060 B 000 1469592
B:0000004:::(00003):object: ttstpoledaem
B:0000005:::(00003):oic:
B:0000006:::(00003): ottstpoledaemon
B:0000007:::(00003): ottstp_stddll
B:0000008:::(00003): 2 1 2 ttstpoledaem 30681 01000060 B 000 2438896
B:0000009:::(00003):object: ttstpoledaem
B:0000010:::(00003):oic:
B:0000011:::(00003): ottstpoledaemon
B:0000012:::(00003): ottstp_stddll
B:0000013:::(00003): ottdllreadmenu
B:0000014:::(00003): ottstpstdlib
B:0000015:::(00003): ottadvexecperm
B:0000016:::(00003): ottdllintegra
B:0000017:::(00003): ottdllvrcsearch
B:0000018:::(00003): ottdlllabels
B:0000019:::(00003): ottscm.dll.comm
B:0000020:::(00003): ottdllbw
B:0000021:::(00003): ottdskmenu
B:0000022:::(00003): ottdllsess.info
B:0000023:::(00003): 3 0 3 ottstpstdlib 42499 01020000 S 000 1919656
B:0000024:::(00003):object: ottstpstdlib
B:0000025:::(00003):oic:
B:0000026:::(00003): ottstpstdlib
B:0000027:::(00003): ottstp_stddll
B:0000028:::(00003): ottdlld_install
B:0000029:::(00003): ottstp_license
B:0000030:::(00003): odmcomdll0001
B:0000031:::(00003): otgbrg0029
B:0000032:::(00003): 6 0 6 ottstppollmes 113 01000060 B 000 1465216
B:0000033:::(00003):object: ottstppollmess
B:0000034:::(00003):oic:
B:0000035:::(00003): ottstppollmess
B:0000036:::(00003): ottstp_stddll
B:0000037:::(00003): 8 2 8 zmmig2100m000 290956 01000060 B 100 4610224
B:0000038:::(00003):object: zmmig2100m000
B:0000039:::(00003):oic:
B:0000040:::(00003): ozmmig2100
B:0000041:::(00003): ottstp_stddll
B:0000042:::(00003): ottstpstandard
B:0000043:::(00003): ottstplogging
B:0000044:::(00003): ozmmig200
B:0000045:::(00003): ozmadmdll1000
B:0000046:::(00003): ottstpamdll
B:0000047:::(00003): odmcomdll0001
B:0000048:::(00003): ontinttt-bois
B:0000049:::(00003): ozmmigdll1000
B:0000050:::(00003):forms:
B:0000051:::(00003): fzmmig2100m000d*
I don't think it will show the correct company number information if your program works across multiple companies/databases.
hsteenwi
12th July 2005, 14:41
On Oracle, you can use the following query:
set verify off
set pagesize 9999
set linesize 120
spool spoolfile
select distinct(substr(username,1,10)) "Baan User"
, substr(osuser,1,10) "Unix User"
, substr(baan.tttaad200000.t$name,1,26) "Name"
, substr(baan.tttaad200000.t$comp,1,7) "Company"
, substr(baan.tttaad100000.t$cpnm,1,26) "Company Name"
, substr(baan.tttaad200000.t$pacc,1,17) "Pak.Comb."
from v$session
, baan.tttaad200000
, baan.tttaad100000
where type = 'USER'
and rpad(substr(upper(baan.tttaad200000.t$user),1,8),8) = rpad(substr(username,1,8),8)
and baan.tttaad200000.t$comp = baan.tttaad100000.t$comp
order by 4
/
exit
This gives you the following output:
Baan User Unix User Name Company Company Name Pak.Comb
---------- ---------- -------------------------- ------- -------------------------- --------
I quess this can be made MSSQL compliant.
So I think it gives you all you want!
Henk.
Rita Kotecha
12th July 2005, 16:07
But is there any way we can do it in Windows ?
hsteenwi
13th July 2005, 11:10
Rita,
As far as my knowledge goes, a query can be executed from OS. Or am I wrong?
Henk.
Viplov
13th July 2005, 13:55
when i execute bshcmd6.2 -p -s -u 10 -w 10 29678
command it is showin bshcmd6.1 not found. Kindly let me know where may be the problem is..?
Viplov
frigyesg
13th July 2005, 17:53
Hi Viplov,
use bshcmd6.1 for Baan_IV. Chec if the BSE Variable is set and you have a path to $BSE/bin.
suhas-mahajan
14th July 2005, 12:59
Please refer to - http://www.baanboard.com/baanboard/showthread.php?t=8604&highlight=licmon
Viplov,
If your OS is windows, perform following steps:
1. Enter your command from BSE\bin directory.
2. Set the path of BSE\bin folder.
3. See the appropriate filename of BSHCMD command under BSE\bin directory. If it is only BSHCMD.EXE, change your command accordingly.
Hope this helps.
Regards,
-Suhas
Rita Kotecha
14th July 2005, 13:27
Thanks Mr Suhas,
I shall try it out.