Data Sync failed with the exception "An unexpected error occurred when applying batch file sync_**.batch. "

Nitya V 40 Reputation points
2024-01-30T11:10:14.1333333+00:00

Hi I am receiving the following error on almost all the tables in a groups .What is the cause and fix Sync failed with the exception "An unexpected error occurred when applying batch file sync_**.batch. See the inner exception for more details.Inner exception: Failed to execute the command 'BulkInsertCommand' for table 'dbo.table1'; the transaction was rolled back. Ensure that the command syntax is correct.Inner exception: SqlException ID: 55169e17-01a9-4e1c-8310-1b8ae85f4d90, Error Code: -2146232060 - SqlError Number:229, Message: SQL error with code 229

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Alberto Morillo 33,426 Reputation points MVP
    2024-01-30T14:18:36.2833333+00:00

    It seems to me is a permissions issue. Please make sure you have provided as a minimum the permissions specified on this documentation.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Rahul Randive 9,176 Reputation points Microsoft Employee
    2024-01-30T17:00:25.05+00:00

    Hi @Nitya V
    Additionally, you can run the Azure SQL Data Sync Health Checker to get the meaningful details. https://github.com/microsoft/AzureSQLDataSyncHealthChecker This PowerShell script will check if all the metadata of a hub and member is in place and also validate the scopes against the information we have on the sync metadata database (among other validations). This script will not make any changes, will just validate data sync and user objects. It will also gather some useful information for faster troubleshooting Thank you!

    0 comments No comments