Run all SQL files in a directory
Create a .BAT file with the following command: for %%G in (*.sql) do sqlcmd /S servername /d databaseName -E -i”%%G” pause If you need to provide username and passsword for %%G in (*.sql) do sqlcmd /S servername /d databaseName -U username -P password -i”%%G” Note that the “-E” is not needed when user/password is provided … Read more