I have a deprecated stored procedure which should no longer be called from code, but there is some system which is still calling it. This is a production server so I have very
@@SPID should give you the current process ID.
@@SPID
Then,
select * from master.dbo.sysprocesses where spid = @@SPID
You can get what you need from one of those columns.