We are doing incremental load using CDC and trying to implement transaction rollback in case of any task failure including ‘CDC control task’ in SSIS package.
To complete 'Get Processing Range' and 'Marked Processed Range', two CDC control tasks are added in the SSIS package. If TransactionOption is 'Supported' (default) for the package, everything works fine. However, if TransactionOption is 'Required' on the other hands, the 'Marked Processed Range' will fail raising '[CDC Control Task] Error:"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.".
Based on tracing, the following statement is suspending.
(@name nvarchar(16))SELECT count(*) FROM [dbo].[cdc_states] WHERE Upper([name]) = Upper(@name)
We tried multiple options like –
- Replacing any TRUNCATE with DELETE statement.
- Setting ‘RetainSameConnection’ property to ‘True’ for source connection manager.
- Setting ‘UseBulkInsertWhenPossible’ property to ‘False’ in data flow tasks.
- Different Isolation Level.
Let me know if anyone have any clue about this error or can suggest a different approach