Azure / elastic-db-tools

Elastic database tools client library allows ADO.NET developers to create applications that implement and use the pattern known as database sharding in Azure SQL Database.
MIT License
145 stars 102 forks source link

ElasticScaleStarterKit: Improve SQL parsing #40

Closed jaredmoo closed 8 years ago

jaredmoo commented 9 years ago

We received private feedback that "The tool [SqlDatabaseUtils.ExecuteSqlScript] is flaky when it comes to parsing the .sql file. Scripts that run perfectly fine in SSMS cause the tool to fail (e.g., multiple comments in a file, and lower-case ‘go’)".

We didn’t intend the util / script to be a general purpose tool for customization, but simply a DAL wrapper for operations necessary to get the sample running so people can learn how the concepts around shard maps, DDR and mappings work. That said it would be helpful to make these operations more robust.

Ideally we would just use an existing T-SQL parser (hopefully from NuGet) instead of duplicating effort here.

jaredmoo commented 8 years ago

Starter kit is sample code. We could pull TSqlParser from DacFx nuget package, but that would increase setup time (due to additional download). Increasing setup time makes sample code less valuable. Therefore will not fix.