Project Description
dbscript 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

  subject "Daily budget update report"

Last edited Nov 17, 2012 at 12:58 AM by davidmwilliams, version 2