Project Descriptiondbscript is a simple scripting language for DBAs, devs, and others who have need to routinely deliver the results of SQL queries in Excel spreadsheet form.
dbscript is intended to be a simple scripting language for database administrators, software developers, systems administrators, business analysts and others who have need for SQL queries to be executed and the results exported to Excel and e-mail.
There are many uses for this, the prime one being to run and mail an Excel-based report without intervention, typically via a routine scheduled task.
dbscript will originally work with Microsoft SQL, Excel and SMTP-based mail servers but future possibilities may include other output formats and database systems.
Some example code:
sqlserver SQLSRV01
username dbuser
password mephisto
database FInancials
query "SELECT * from tbBudget where FinYear = '2013'"
mailserver SMTPSRV01
# Note query results implicitly saved to Excel spreadsheet and attached to e-mail
mail accounts@mycorp.com
subject "Daily budget update report"