Skip to content

Instantly share code, notes, and snippets.

@antonydenyer
Created September 11, 2012 10:21
Show Gist options
  • Save antonydenyer/3697427 to your computer and use it in GitHub Desktop.
Save antonydenyer/3697427 to your computer and use it in GitHub Desktop.
Run All Sql in a directory
@echo on
set DbName="db_name"
for %%i in (*.sql) do sqlcmd -E -S localhost -d %DbName% -i %%i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment