| Author |
user Associated with a pid
|
|
| nsajus@yahoo.com 2005-10-28, 8:23 pm |
| Hi,
I need some information regarding obtaining the user associated with a
pid/process in the Sql Sever. I am trying to create a trigger on Delete
on one of the tables in a database.. Is it possible to get the user
associated with the process(pid) who is deleting rows from a table in
that trigger?
Any help will be appreciated.
Thanks,
Ann
| |
| David Gugick 2005-10-28, 8:23 pm |
| nsajus@yahoo.com wrote:
> Hi,
>
> I need some information regarding obtaining the user associated with a
> pid/process in the Sql Sever. I am trying to create a trigger on
> Delete on one of the tables in a database.. Is it possible to get the
> user associated with the process(pid) who is deleting rows from a
> table in that trigger?
>
> Any help will be appreciated.
>
> Thanks,
> Ann
Try SUSER_SNAME()
--
David Gugick
Quest Software
www.imceda.com
www.quest.com
| |
| Erland Sommarskog 2005-10-28, 8:23 pm |
| (nsajus@yahoo.com) writes:
> I need some information regarding obtaining the user associated with a
> pid/process in the Sql Sever. I am trying to create a trigger on Delete
> on one of the tables in a database.. Is it possible to get the user
> associated with the process(pid) who is deleting rows from a table in
> that trigger?
USER give the user name within the database.
SYSTEM_USER gives the login name in SQL Server.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
| |
| nsajus@yahoo.com 2005-10-31, 9:23 am |
| Thanks every one..Really appreciate it!
|
|
|
|