Bob,
This is the stored procedure that I found in a trace that will give you a users name:
MSP_WEB_SP_QRY_GetAllResourceForResId
This procedure needs a parameter of a userid number - mine is 176. So when I login and the trace gets to this call it looks like this:
exec MSP_WEB_SP_QRY_GetAllResourceForResId 176
Of course, this stuff is called from a users web session and the userid is probably stored in a cookie so that future calls can make use of it as well. So the bottom line is, I'm not sure any session data is stored in the database that you could use in any meaningful way.
Hope that helps.
Earl
Thanks Earl, but that is not quite what I was looking for. I want to know in
a stored procedure or trigger, who the active user is that initiated the
process. If I understand correctly, and maybe I don't, once you log on to
ProjectPro or PWA the application connects to SQL Server as "MSProjectUser"
or "MSProjectServerUser". So If I look at the DB function SUSER_NAME() I get
MSProjectUser, but I want to get "Fred".