What are the challenges you face when working across database platforms? Take the survey

Building DB Package failing with syntax error

f.tenkatef.tenkate Posts: 2
edited August 30, 2016 2:06AM in DLM Automation
We've recently upgraded to SQL Server 2016, one of my colleagues has now also create a view making use of the JSON output format supported in 2016.

When doing a manual compare and deploy everything is fine and dandy, however when using DLM Automation we see the following in the build log (and the build itself fails);

[08:44:23][Validating database state] Error: Synchronization of 'Scripts.state' and
[08:44:23][Validating database state] 'np:\.pipeLOCALDB#A43A27DC sqlquery.sqlCI_29c4b658-9f6e-4a7c-b839-aa55554c1
[08:44:23][Validating database state] 1d9' failed: Incorrect syntax near 'WITHOUT_ARRAY_WRAPPER'. Incorrect syntax
[08:44:23][Validating database state] near 'JSON'. Incorrect syntax near the keyword 'FOR'. Incorrect syntax near the
[08:44:23][Validating database state] keyword 'FOR'. Incorrect syntax near the keyword 'FOR'. Error executing the
[08:44:23][Validating database state] following SQL: CREATE VIEW [dbo].[vw_Elasticsearch_Debtor] AS SELECT d.ID, (
[08:44:23][Validating database state] SELECT d.ID AS 'index._id' FOR JSON PATH, WITHOUT_ARRAY_WRAPPER ) AS
[08:44:23][Validating database state] [json.action], ( SELECT c.Company_ID AS 'companyid', ...

We are using TeamCity 10.0.1 with the latest plugin installed.

I also updated our DLM Environment to the absolute latest version this morning since I suspected this might be something that is already fixed in a newer version.

Does this error make sense to anyone? Is there something I can do about this or is this some shortcoming/bug?


  • Options
    Thanks for contacting us and sorry you are having this issue!
    I have not seen this particular issue before- you can replicate a build by comparing the Source Controlled repository to an empty database.
    If you could send in the deployment script that would help, or you can figure out how it is failing based on the segment it identifies in the error.

    I have followed up with you via email and that should be better for this type of information.

    Thanks for your help!

    Andrew Pierce
    Technical Sales Engineer
    Redgate Software
Sign In or Register to comment.