【1】规划
(1)test.bat :运行循环
(2)select.sql :测试存活SQL
(3)test.log:查看输出日志
【2】实际文件
(2.1)test.bat
for /l %%a in (1,1,10000) do ( sqlcmd -S 10.20.50.62 -U sql_exporter -P qICJEasdqwDiOSrdT96 -i select.sql >>test.log )
(2.2)存活测试
set nocount on; select getdate(); waitfor delay '00:00:01'
【3】运行实践