we currently face an issue with MS SQL Server Integration Services (SSIS) regarding the use of C# code within Scripting Components.
During the execution of our SSIS packages the following error(s) are thrown by SSIS:
• The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.
• Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors.
• Error: CS2001 - Source file 'C:\Windows\TEMP.NETFramework,Version=v4.7.AssemblyAttributes.cs' could not be found, CSC, 0, 0
Those errors appear during execution of the SSIS packages using an SQL Server Agent Job.
In the past those Agent Jobs where executed under the Account used to run the SQL Server Agent Service. Using those settings the packages worked as expected, executing without trowing any errors.
Following a new security requirement of our company we had to switch to an execution under a separate Account. We have created the required Proxy entry under SQL Server Agent -> Proxies -> SSIS Package Execution
This proxy is linked to the corresponding AD Account and has the "SQL Server Integration Services Package" subsystem configured as active.
The proxy is then selected in the "Run As" settings used within the SQL Server Agent Job Steps tasked with running the SSIS packages.
SSIS execution starts as expected whe starting the Agent Jobs. However, once a package containing a Script Task reaches the Script Task it will fail and throw the errors mentioned above.
However, the errors thrown at us give us no real clue as to where to investigate next.
The Account used by the proxy has been granted the following permissions
- Integration Services Catalogs:
-> SSISDB Subfolders: Read + Read Objects + Execute Objects
-> SSIS Projects: Read + Execute
- SSISDB Database
- Databases used by the SSIS Packages
Some details about the used software
• Version MS SQL Server 2019 components (Database, Integration Services, etc.) Vers. 15.0.4073.23 (Microsoft SQL Server 2019 (RTM-CU8) (KB4577194) - 15.0.4073.23 (X64) Sep 23 2020 16:03:08 Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor))
• Dev Environment: Visual Studio Professional 2017 Version 15.9.16
We suspect that this is some kind of permission issue ( AD Account missing some permission to read/write from/to disk or missing permissions to compile the script, etc. )
Any tips on where / what to investigate next would be highly appreciated.