Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

user Associated with a pid
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


Report this thread to moderator Post Follow-up to this message
Old Post
nsajus@yahoo.com
10-29-05 01:23 AM


Re: user Associated with a pid
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


Report this thread to moderator Post Follow-up to this message
Old Post
David Gugick
10-29-05 01:23 AM


Re: user Associated with a pid
(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


Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
10-29-05 01:23 AM


Re: user Associated with a pid
Thanks every one..Really appreciate it!


Report this thread to moderator Post Follow-up to this message
Old Post
nsajus@yahoo.com
10-31-05 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 03:31 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006