How do you import a large MS SQL .sql file?

前端 未结 11 1442
心在旅途
心在旅途 2020-11-28 00:20

I use RedGate SQL data compare and generated a .sql file, so I could run it on my local machine. But the problem is that the file is over 300mb, which means I can\'t do copy

11条回答
  •  醉话见心
    2020-11-28 01:06

    I had exactly the same issue and had been struggling for a while then finally found the solution which is to set -a parameter to the sqlcmd in order to change its default packet size:

    sqlcmd -S [servername] -d [databasename] -i [scriptfilename] -a 32767
    

提交回复
热议问题