I am trying to execute a large sql script containing about 1,000,000 simple UPDATE queries.
The total size of this script file is about 100 MB.
When I run this script, I get an Out Of Memory exception.
When I split a file into 10 MB chunks, I can run each of them.
However, for convenience, I would like to have only one script, I can run right away. Is there any statement that I can imagine, so that SQL Server releases the allocated memory after running each query so that I can execute this large script right away?
David source share