title: Execute .sql files that are used to run in SQL Management Studio in python
body: <p>As part of artifacts delivery, our developers give the data and structure scripts in .sql files. I usually "double click" on these files to open in "Microsoft SQL Server Management Studio". Management studio will prompt me for entering database server and user/pwd. I enter them manually and click on Execute button to execute these scripts.</p>
  
  <p>These scripts contain structure and data sql commands. Each script may contain more than one data command (like select, insert, update, etc). Structure and data scripts are provided in separate .sql files.</p>
  
  <p>These scripts also contain stored procedures and functions, etc. They also contain comments / description.</p>
  
  <p>I want to automate execution of these scripts through python. I looked at pyodbc and pymssql but they dont look like solve my issue.
  Through pyodbc, i need to read each .sql file and read the sql commands and execute them one by one. As the files may have comments / description / SPs / etc, reading the files will be little difficult.</p>
  
  <p>Can anyone give suggestion on how to automate this?</p>
  
  <p>Thanks in advance.</p>