Prior to SQL Server 2017, query processing was a monolithic process. The SQL Server query optimizer would first construct a query plan for a batch of T-SQL code, a stored procedure, or function and ...
I'm not sure about your question, but you could try using an xp_cmdshell statement to call the batch file.
Results that may be inaccessible to you are currently showing.
Hide inaccessible results