title: execute script against sql server database
body: <p>I have a database script in a .sql file for sql server 2008 that I want to execute against my database. Rather this being a manual exercise, I would like to automate it. I have 3 options available to me, a batch file, powershell or c#. The way I execute this will be influenced by my next question - I want to execute the script but also be aware in code if the script fails to execute for any reason? This will be part of a general set of install steps so want the install to halt if the script does not execute correctly.</p>