System.OutOfMemoryException with large script.
I successfully performed a data compare and saved the script to a file. My next task to run the script using the C# code below but I get an out of memory error when during the BlockLoader.Load method when try to load a moderately large script (100MB). Is there an alternative method to execute large scripts that avoids this error?
var blockLoader = new RedGate.Shared.SQL.ExecutionBlock.BlockLoader(@"C:MyScriptFile.sql"); var executionBlock = blockLoader.Load(); var executor = new RedGate.Shared.SQL.ExecutionBlock.BlockExecutor(); executor.ExecuteBlock(executionBlock, @".", "MyDatabase", true, "", "");
0 · Share on Twitter