Scripting with Sql Server 2005
Easiest way to go is to get sqlcmd from here, you'll have to get :
- sqlncli.msi : Microsoft SQL Server Native Client
There is many good tutorials around but to be quick the standard command line is
sqlcmd -SServer -UUser -PPassword -dDatabase -iMyFile.sql
You can also add -b to error out in case of SQL error.