I have a stored procedure in SQL Server (using SSMS) with dynamic SQL. The input data is around millions of rows. Hence procedures takes up entire log space and return an error logspace filled. I tried separating the statements using batches inside dynamic SQL but it did not work.
Does anyone have a solution as how to split batches inside a stored procedure?