SSIS package with a PowerQuery source gets an error when run in a SQL Server Agent Job.

Tom Putney 11 Reputation points

Can you give me some direction about what might be going wrong?

I created an SSIS package that includes a Power Query source using Microsoft Visual Studio Community 2019 Version 16.11.18. When I run the package in VS, it works without error.
When I execute the package in a SQL Server Agent Job, it fails with the following error message.

Executed as user: domain\username. Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Microsoft.SqlServer.XEvent.Configuration.SessionConfiguration.!SessionConfiguration() at Microsoft.SqlServer.XEvent.Configuration.SessionConfiguration.Dispose(Boolean A_0). The return value was unknown. The process exit code was -1073741819. The step failed."

The SQL Server running is
Microsoft SQL Server 2019 (RTM-CU18) (KB5017593) - 15.0.4261.1 (X64) Sep 12 2022 15:07:06 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor)

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,488 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
959 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,057 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 34,581 Reputation points

    Hi @Tom Putney

    Please check your SQL Server version and SSMS version and make sure that they are matched.

    You may run a Process Monitor to check if that we could get any lead from there.

    Also, you could check the Event Viewer Logs to see if there is any useful information.


    Zoe Hui

    If the answer is helpful, please click "Accept Answer" and upvote it.