Forum Discussion
AJ-AJ
Jun 28, 2024Copper Contributor
Help to Capture SP error without try catch block
Hi there, I have 100s of SPs to make change at one shot without touching existing logic. Many SPs have try catch block many dont have. im looking to track if sp ran successful or had fa...
olafhelper
Jul 01, 2024Bronze Contributor
AJ-AJ , on SQL Server side it's not possible to log error without a TRY/CATCH block.
If the SP are called from an application, then the app have to log errors.
If the SP are called from a Agent-job, then add a "On eror" step to log the raised error.