title: Where is result of OBJECT_NAME(@@PROCID) obtained from? (typo corrected)
body: <p>I have a stored procedure that has EXECUTE AS another user that has very restricted access.  I cannot get the results from OBJECT_NAME(@@PROCID) when I run that stored procedure.  @@PROCID does have a value, so it's the lookup that is failing.</p>
  
  <p>I think it's a permissions issue, so can someone tell me where the name of the stored procedure is obtained from?  Maybe I can fix my issue by granting some SELECT permissions to the EXECUTE AS user.</p>
  
  <p>If anyone has any other ideas, LMK.  I'm hardcoding the stored procedure name for now.</p>