在CMD中执行:sqlcmd -S 服务器路径 -U 数据库登录用户名 -P 数据库登录密码 -d 目标数据库 -i 脚本文件(.sql)全路径 转载于:https://www.cnblogs.com/panjinzhao/p/11426239.html