我正在使用 Windows 10 并直接从命令提示符(管理员)运行它。有没有办法改变输出到文本文件的行数?
BCP "SELECT * FROM db.dbo.table WHERE row_date = '2016-10-11'" queryout "C:/Users/table.csv" -t, -c -S "servername" -T
1000 rows successfully bulk-copied to host-file. Total received: 1000
1000 rows successfully bulk-copied to host-file. Total received: 2000
1000 rows successfully bulk-copied to host-file. Total received: 3000
1000 rows successfully bulk-copied to host-file. Total received: 4000
1000 rows successfully bulk-copied to host-file. Total received: 5000
1000 rows successfully bulk-copied to host-file. Total received: 6000
12136 rows copied.
Network packet size (bytes): 4096
然后我尝试了 -b 5000 和 -b10000:
BCP "SELECT * FROM db.dbo.table WHERE row_date = '2016-10-11'" queryout "C:/Users/table.csv" -t, -c -b 5000 -S "servername" -T
但它仍然输出 1000 行。我尝试使用 -a 增加数据包大小,但这根本没有影响。
该参数仅更改导入批量大小。反正我不知道要更改导出行计数报告。