Execute large SQL script on MS SQL server

Execute large SQL script on MS SQL server

Having trouble executing a large SQL script using the SQL server management studio?
Use the command line tool sqlcmd

sqlcmd -S server\instance -i script_file.sql

This should work, unless you have errors in your script of course 😉
Don’t forget to start your script with a correct use statement.

use databaseNameHere;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.