retriving the username, who is executing the query

  • Hi There,

    I have a requirement of knowing the user who is executing a query/stroed proc.let me be more clear:

    lets say ,we have an application which connects to the sql server and invokes some stored procs(say SP_Temp) on that.now in my Sp_Temp i need to have a T-sql statement which finds out which user is executing this query (assuming the connection string to be using integrated security ,the user name what we get should be the windows user name).could anybody please throw some thoughts on the above.

    Hope i am clear.

    Thanks & Regards

    Deepak

  • this is a cross post from here...

    http://www.sqlservercentral.com/Forums/Topic411818-338-1.aspx

    To help us help you read this[/url]For better help with performance problems please read this[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply