Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Getting name of executing stored proc?

Author  Topic 

jhilb
Starting Member

22 Posts

Posted - 2003-10-09 : 11:30:55
Is there a way to get the name of the executing stored proc in TSQL? I know @@PROCID gets you the id, but how to get the actual name of the executing proc while inside the proc itself?

raymondpeacock
Constraint Violating Yak Guru

367 Posts

Posted - 2003-10-09 : 11:45:37
Use the OBJECT_NAME, passing the @@procid

i.e. SELECT OBJECT_NAME(@@procid)

Raymond
Go to Top of Page
   

- Advertisement -