From: Plamen Ratchev on
You can use the SQLCMD utility:
http://msdn.microsoft.com/en-us/library/ms180944.aspx

--
Plamen Ratchev
http://www.SQLStudio.com