Lesson Learned #363: Incorrect syntax near the keyword 'NOT' using DataSync
Published Jun 05 2023 05:18 AM 1,568 Views

This last week we got a service request where our customer faced the following error message: 'Incorrect syntax near the keyword 'NOT'.Inner exception: SqlException ID: XYZ-XYZ1-XYZ2-XYZ3-XYZ4, Error Code: -2146232060 - SqlError Number:156, Message: SQL error with code 156 For more information, provide tracing ID ‘XYZ5-XYZ6-XYZ7-XYZ8-XYZ9’ to customer support.' during the syncronization process of DataSync. Following I would like to share with you the lessons learned about it. 


Using SQL Auditing from the Portal or SQL Server Profiler extension in Azure Data Studio we were able to see the query that Azure Data Sync is using and why is failing at the moment of the syncronization.


Testing the query from SQL Server Management Studio we found that this query is using a computed column and we reported that Azure Data Sync doesn't supported computed columns. What is SQL Data Sync for Azure? - Azure SQL Database | Microsoft Learn.



Version history
Last update:
‎Jun 05 2023 05:18 AM
Updated by: