Hi,
MS SQL Server has the concept of a batch of SQL statements which I think is missing from dbMaintain but would hopefully be easy to add.
The motivation for doing so is that it would enable dbMaintain to be used for creating stored procedures for SQL Server (please correct me if I am wrong but I don't see any way of doing this at present).
A batch is one or multiple T-SQL statements executed by SQL Server as a single unit. Batches are separated by a GO statement, which marks the end of one batch and beginning of another. The GO command must appear on a separate line from all other commands.
I think all that would be necessary to change would be:
1. provide a new option which specifies whether dbMaintain should use the semicolon or "GO" as a delimiter when the mssql dialect is active.
2. If "GO" is specified as a delimiter then dbMaintain buffers all lines of text until a "GO" command is found. At that point the entire buffer should be sent to SQL Server for processing. Semicolons in the buffered text should not get treated any differently than any other character (this requirement is maybe not a deal-breaker since semicolons as statement separators are optional).
SQL Server documentation for "GO": http://msdn.microsoft.com/en-us/library/ms188037.aspx
"Create Procedure": http://msdn.microsoft.com/en-us/library/aa258259\(SQL.80).aspx
Thanks,
Richard Sullivan
(SQL Server and dbMaintain newbie)