From .net how to I send many “batches” of SQL to Sql-Server without lots of round trips?
问题 We have code that reads in a set of SQL script file, and after doing some processing on them splits them into batches by finding the “GO” keyword and then sends each batch to Sql Server using a separate SqlCommon. Is there a better way of doing this so we: Don’t have as many round trips Never have SQL Server waiting for the next batch Run faster. (The batches are mostly creating tables, index, views and stored procs. Speed is an issue as our integration tests calls the code often. The sql