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

前端 未结 11 1443
心在旅途
心在旅途 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 00:46

    1. Take command prompt with administrator privilege

    2. Change directory to where the .sql file stored

    3. Execute the following command

      sqlcmd -S 'your server name' -U 'user name of server' -P 'password of server' -d 'db name'-i script.sql

提交回复
热议问题