ADF Pipeline Still Uses Old Linked Service After Updating Sink Dataset and Publishing

Suyash Kant 40 Reputation points
2025-06-08T18:48:38.9133333+00:00

Hi,

I'm encountering an issue in Azure Data Factory where my pipeline seems to ignore an updated linked service for the sink dataset.

Here’s the scenario:

  • I have a pipeline with a Copy Data activity.

The sink dataset was originally using Linked Service A.

I updated the sink dataset to use Linked Service B instead.

I saved and published the changes.

I verified the change in Azure DevOps—specifically in the pipeline and dataset JSON templates—and confirmed that the sink now references Linked Service B.

Despite all this, when I run the pipeline, the data still ends up in the database associated with Linked Service A.

What I've already checked:

The sink dataset is correctly pointing to Linked Service B.

The connection string in Linked Service B points to the new/different database.

I re-published multiple times and verified changes in DevOps to ensure the correct version is deployed.

It seems like the pipeline is still somehow holding on to the old linked service. Has anyone seen this behavior before or know what might be causing it?

Thanks!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,582 questions
{count} votes

Accepted answer
  1. Vinodh247 34,336 Reputation points MVP Volunteer Moderator
    2025-06-09T04:41:22.34+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    this is a known behavior in ADF, and there are a few possible reasons why your pipeline is still writing to the original 'Linked Service A' despite updating the sink dataset:


    Key Possibilities and Solutions

    1. Sink dataset overridden at activity level

    Even though the dataset is updated globally, check if the Copy Data activity itself has the linked service overridden at the activity level.

    Open the Copy Data activity.

    Go to the Sink tab.

    Check if it has a manually selected linked service or if it is pointing to a dataset that is internally configured with Linked Service A.

    Resolution: Remove any manual override and ensure the sink is using the dataset referencing Linked Service B.

    1. Parameterised linked service or dataset

    Are your datasets or pipelines using parameters to determine the linked service?

    • If so, the parameter might still be passing a reference to Linked Service A during runtime.
    • Resolution: Check runtime parameters and make sure the correct linked service or dataset reference is being passed.
    1. Pipeline or dataset caching Issue

    Sometimes, ADF UI or runtime caches old references, especially if you are debugging or re-running from the "Debug" button instead of triggering a new run.

    Resolution: Do a full trigger run (not debug), or restart your browser/session, clear cache, and try again.

    1. Old artifact deployed in IR

    If you are using self-hosted IR or CI/CD pipelines (via Azure DevOps), ensure that the correct ARM template was actually deployed to the target environment.

    Resolution: Double-check the Linked Service deployment logs, and consider redeploying just the linked service and datasets manually to confirm.

    1. Copy activity uses Inline sink Instead of dataset

    Sometimes, the Copy Activity may have an inline sink (directly configured within the activity) rather than referencing a separate dataset.

    Resolution: Open the JSON view of the pipeline and verify whether the sink is referencing a dataset or has inline settings that still use Linked Service A.

    Steps to Troubleshoot Further

    Open JSON view of the pipeline in ADF Studio and verify the sink section.

    Trace the exact dataset JSON to confirm no hidden reference or parameter is reverting to Linked Service A.

    Run the pipeline with verbose logging and inspect logs to confirm which linked service is being used.

    1. If the issue persists, export the pipeline + dataset JSONs and search for LinkedServiceA to confirm no lingering references.

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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