Several days ago, i saw a question in the MSDN forums, which led me to write this blog. I will rephrase the original question a bit and discuss the following request: How can we get the name of the current Stored Procedure (SP) from inside the SP
This is actually very simple question with multiple solutions which we can use on SQL Server On-Premises, but these solutions are not supported in other frameworks like Azure Data Warehouse and Parallel Data Warehouse.
My goal is to provide solutions for Azure Data Warehouse and Parallel Data Warehouse, but on the way I will cover the common solution for SQL Server and Azure Database as well.