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)