Friday, March 9, 2012

Need LoginID from within Stored Procedure

select loginame from master.dbo.sysprocesses where spid = @.@.spid
This might help. I don't know if there is any other alternative.
Also you can use select SERVER_USER.

No comments:

Post a Comment