Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, 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
Post Follow-up to this messagensajus@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
Post Follow-up to this message(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
Post Follow-up to this messageThanks every one..Really appreciate it!
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread