Reputation: 755157
Is there a documented or at least vaguely documented way to make use of the SQL Server batchparser.dll
that's hidden away deep inside the SQL Server directory structure (C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn
)?
Would that be a possibility to submit a T-SQL batch and have it parsed for syntax errors?
Upvotes: 2
Views: 349
Reputation: 4300
Based on David Brabant's link (http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.batchparser(v=sql.110).aspx) this dll just parses the input text into batches (e.g. text between separate GO statements). The specific function to do the parsing is
You might find the TSqlParser class more useful:
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.transactsql.scriptdom.tsqlparser.aspx
or SqlParser namespace:
Upvotes: 1