Share via

Getting issue "Unable to fetch cdc processing range" in sql server

Anonymous
2023-06-19T12:42:01.0366667+00:00

I am getting the below issue continuously for the job which points to SSIS package to capture and populate the changes to audit tables and lsn state variable values getting changed to TFREDO instead of TFSTART or TFEND
Error -"Possible reasons: Unable to fetch CDC processing range or unable load cache"

This issue is being resolved when we reset the lsn range value to the last successful state

everytime i have manually check and reset the lsn values to last successfull state and this is coming for all clients frequently

can anyone let us know the reason on why this is happening and how it can be resolved?

SQL Server Integration Services
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Answer accepted by question author

Ryan M Jusay 165 Reputation points
2023-06-20T02:02:09.4566667+00:00

Here are a few possible causes and steps to address the problem:

CDC processing range issue:

  • Ensure that CDC is enabled for the relevant database and table. Verify that the capture job is running and capturing changes correctly.
  • Check if the CDC cleanup job is functioning properly. If the cleanup job hasn't run regularly, it can cause the CDC tables to grow excessively, leading to performance issues. Run the CDC cleanup job to remove unnecessary change data.
  • Review the CDC processing range settings. Verify that the start LSN (Log Sequence Number) and end LSN values are within the appropriate range. Adjust the processing range if necessary.

CDC cache issue:

  • Check if the CDC cache is being loaded correctly. Review the SSIS package configuration and ensure that the cache loading step is properly configured and executed.
  • Verify that the CDC cache tables are accessible and have the necessary permissions for the account executing the SSIS package.
  • If the CDC cache has grown too large, it might impact performance and cause issues while loading the cache. Consider cleaning up or truncating the CDC cache tables if appropriate.

Incorrect LSN state variable values:

  • LSN state variables such as "TFSTART," "TFEND," and "TFREDO" are used to track the CDC processing range. Ensure that the appropriate state variable is used in the SSIS package to set the start or end LSN values correctly.
  • Review the SSIS package logic and verify that the LSN state variable values are being set and used accurately throughout the package.
  1. Consider database maintenance.
  • Perform regular database maintenance tasks such as updating statistics, rebuilding indexes, and ensuring sufficient disk space to optimize the performance of CDC-related operations.

Review job and package configurations:

  • Check the job and package configurations for any misconfigurations or inconsistencies. Ensure that the job is using the correct package and that all required parameters and connections are properly configured.

Enable verbose logging:

  • Enable verbose logging in the SSIS package to gather more detailed information about the error. Examine the logs to identify any specific errors or warnings related to the CDC processing range or cache loading.

If these steps do not resolve the issue, it's recommended to involve experienced database administrators or developers with expertise in SSIS and CDC to further investigate and troubleshoot the problem.

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. Limitless Technology 45,231 Reputation points
    2023-06-20T20:40:23.2333333+00:00

    Hello there,

    The error message "Unable to fetch CDC processing range" in SQL Server typically occurs when there is an issue with the Change Data Capture (CDC) feature. CDC is a feature in SQL Server that captures and records changes made to tables, allowing you to track and analyze data modifications.

    To troubleshoot this issue, you can follow these steps:

    Verify CDC is enabled: Ensure that CDC is enabled for the specific database and table you are encountering the issue with. You can use the following query to check if CDC is enabled for a database:

    Check CDC job status: CDC relies on SQL Server Agent jobs to process the captured changes. Ensure that the SQL Server Agent is running and that the CDC job is enabled. You can verify the status of CDC jobs by expanding the "SQL Server Agent" node in SQL Server Management Studio (SSMS) Object Explorer and navigating to the "Jobs" folder.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.