Adding to the correct comments of other posters, in principle, there is nothing wrong, but you need to monitor the execution time if the procedure is called, for example, by an external application, which, in accordance with a certain timeout .
A typical example is if you call a stored procedure from a web application: when the default timeout expires because your execution chain takes longer, you get a failure in the web application, even if the stored procedure commits correctly. The same thing happens if you call from an external service. This can lead to inconsistent behavior in your application, the launch of error management procedures in external services, etc.
If you are in situations like this, what I am doing is breaking the chain of calls that redirect child calls with long execution to different processes using Service Broker .
eddo source share