Sean Lange wrote:
Good question but imho the best answer was not on the list of choices. It would be better to use ORIGINAL_LOGIN() instead of USER_NAME().
It seems to me that the user name is going to be more frequently a useful piece of information.
PRINT 'This action was initiated by ' + USER_NAME() + ' and it failed.'
PRINT 'This action was initiated by ' ORIGINAL_LOGIN() + ' as ' + USER_NAME() + ' and it failed.'
Puto me cogitare, ergo puto me esse.
I think that I think, therefore I think that I am.