I am testing the behavior of a SELECT statement that returns 170,000,000 rows using SQLCMD. My goal is to cut out the time spent receiving the result-set on the client end (the time the process shows the ASYNC_NETWORK_IO waittype while an output file is being written to disk). I would like to have SQLCMD run my SELECT statement but not actually save or output the result-set. Just returning the number of rows affected would be fine. Is this possible?
sqlcmd -E -t 0 -S server\instance -d databaseName -i hugeselect.sql -o none?
-o nul:– Remus Rusanu Oct 22 '12 at 20:47