Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
A client's CDC tasks are frequently failing intermittently with the following error after a windows patch last month.
RetCode: SQL_ERROR SqlState: 42000 NativeError: 105117 Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]An error occurred while authenticating against Managed Service Identity: 'An unexpected error occurred while trying to retrieve access token.’
The target is Azure Analytics. I've researched the error online and haven't found much indication to the issue. Has anyone seen this before? The task stops, then can be resumed again. I am also seeing these two errors every time this occurs
[TARGET_APPLY ]E: Failed to load data of file CDC000013BF.csv to database
[TARGET_APPLY ]E: Failed to copy data to net changes table [1022505] (bulk_apply.c:6413)
Help with this is appreciated. Thank you
Kind regards,
Mohammed
Hello Mohammed, @MoeE
Thanks for the post here.
RetCode: SQL_ERROR SqlState: 42000 NativeError: 105117 Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]An error occurred while authenticating against Managed Service Identity: 'An unexpected error occurred while trying to retrieve access token.’
It appears that the issue is more likely related to the latest Windows patch or the SQL Server ODBC Driver.
The error indicates that the Managed Identity token failed to be retrieved from the Azure Instance Metadata Service (IMDS).
Possible causes include:
In summary, these errors reflect a Synapse client/server communication problem.
This issue should be reviewed by the user’s DBA or escalated to Microsoft if necessary.
If you would like to investigate further, we suggest the following steps:
Check the SQL Server ODBC Driver version
Review driver timeout period — by default, the ODBC driver waits only a few seconds to retrieve the MSI token. If IMDS responds slowly, authentication may fail.
Set TARGET_APPLY to Verbose, reproduce the issue, and review the detailed task log files.
Enable ODBC tracing to capture additional diagnostic details.
Hope this helps.
John.