title: Execute sql file on SQL Server using C#
body: <p>I have many files for procedures, views, functions, etc.</p>
  
  <p>I want to execute these files (creating components) in appropriate database on SQL Server 2005/2008.</p>
  
  <p>Also the point is I want to execute them using C#.</p>
  
  <p>Another point to mention, I want the application to be such that I can execute this files on a remote SQL Server too. Also client machine may not have osql,sqlcmd command tool.</p>
  
  <p>Can someone please guide me on this.</p>