Posted by MADS on 03/16/07 14:49
Found it !!!
setuser 'q01'
-- quien importo una orden de transporte
select USERNAME, SYDATE, SYTIME, CLIENT
from TPLOG
where CMDSTRING like '%D02K909789%
>From BOL:
SETUSER
Allows a member of the sysadmin fixed server role or db_owner fixed
database role to impersonate another user.
Important SETUSER is included in Microsoft® SQL Server™ 2000 only for
backward compatibility, and its usage is not recommended. SETUSER may
not be supported in a future release of SQL Server.
Syntax
SETUSER [ 'username' [ WITH NORESET ] ]
Arguments
'username'
Is the name of a SQL Server or Microsoft Windows NT® user in the
current database that is impersonated. When username is not specified,
the original identity of the system administrator or database owner
impersonating the user is reestablished.
WITH NORESET
Specifies that subsequent SETUSER statements (with no specified
username) do not reset to the system administrator or database owner.
[Back to original message]
|