on 09-16-2008 8:39 AM
Hello Experts,
Is the system name being captured while we enter any document ?
I mean can we see the LOG that on which computer / terminal user has entered any specific document(s).
Help Required ...
Thanks
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muhammed
As far as I know, NO. We had a similar request from a customer to stamp the MAC ID of each user to each transaction. You can see which machine name and MAC ID is currently using the system from the SQL management studio or using a query. Try the following query and change the computer name from peter_laptop to blank for a complete list, as well as the DB ID to the internal ID of the database the users are logging onto to.
-- cleanup
if (object_id(N'tempdb..#snapshot_processinfo') is not null)
exec(N'drop table #snapshot_processinfo')
if (object_id(N'tempdb..#snapshot_lockinfo' ) is not null)
exec(N'drop table #snapshot_lockinfo' )
if (object_id(N'tempdb..#snapshot_processinfofltr') is not null)
exec(N'drop table #snapshot_processinfofltr')
-- build snapshot containing info about processes #snapshot_processinfo
select
[Process ID] = p.spid,
[IsSystemProcess] = case when s.is_user_process = 1 then 0 else 1 end,
[User] = p.loginame,
[Database] = p.dbid,
[DB Name] = ISNULL(db_name(p.dbid),N''),
[Status] = p.status,
[Open Transactions] = p.open_tran,
[Command] = p.cmd,
[Application] = p.program_name,
[Wait Time] = p.waittime,
[Wait Type] = case when p.waittype = 0
then N''
else p.lastwaittype
end,
[Wait Resource] = case when p.waittype = 0
then N''
else p.waitresource
end,
[CPU] = p.cpu,
[Physical IO] = p.physical_io,
[Memory Usage] = p.memusage,
[Login Time] = p.login_time,
[Last Batch] = p.last_batch,
[Host] = p.hostname,
[Net Library] = p.net_library,
[Net Address] = p.net_address,
[Blocked By] = p.blocked,
[Blocking] = 0,
[Execution Context ID] = p.ecid,
[ID] = IDENTITY(int, 1, 1),
[ROW ID] = 0
into #snapshot_processinfo
from master.dbo.sysprocesses p, master.sys.dm_exec_sessions s
with (NOLOCK)
where p.spid = s.session_id and p.loginame = 'sa' and p.program_name = 'SAP Business One' and p.hostname = 'PETER_LAPTOP' and p.dbid = 9 -- Database name cannot be used, must use internal ID
order by p.spid
update #snapshot_processinfo
set [ROW ID] = [ID]
SELECT * FROM #snapshot_processinfo
Remember square brackets will be replaced by backslashes and colon.
Kind regards
Peter Juby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.