Database files
SQL Server GO batch splitter
Split GO-separated scripts while respecting strings, identifiers and comments.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Recognize standalone GO with an optional positive repeat count. Track quoted text, bracketed identifiers and nested block comments across lines.
The example contains two batches; the first repeats twice, giving three batch executions.
Limits
No SQL execution or syntax certification. Repeat metadata stays separate rather than expanding text. Batch edges are trimmed; SQLCMD variables, :commands and custom separators are excluded.