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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.