Olá israel,
Vc pode usar o utilitário osql.exe...veja um exemplo:
Using osql Interactively
To use osql interactively, type the osql command (and any of the options) at a command prompt. You can read in a file containing a query (such as Stores.sql) for execution by osql by typing a command similar to this:
osql /E /i stores.sql
You can read in a file containing a query (such as Titles.sql) and direct the results to another file by typing a command similar to this:
osql /U alma /P mypassword /i titles.sql /o titles.out
Qualquer coisa pesquise no BOL do SQL Server por "osql"
um abraço
Nilton Pinheiro
www.mcdbabrasil.com.br