I have a very strange issue. A single stored procedure is executed the second time 'by itself' when is called by Powershell invoke-sqlcmd command when the Query Timeout interval is exceeded.
When I trace it using SQL profiler I can see the procedure starts executing, stops in the middle after the Query Timeout is exceeded and (here is the issue:) a new SPID calls the same procedure again under the same ClientProcessID! There is no any code in the application to re-run the procedure, and it is proved.
Has anybody have a clue what might trigger the procedure to run the second time?