I have an SSIS package to download an excel file from a network drive. It is designed to download content, and then move the file to the archived folder.
Everything works well when the following SQL statement is run in the SSMS window.
However, when it is copied to the SQL agent job and executed from there, the file does not load or move. But it shows "successful" from the agent’s log.
The same thing happened with the “SSIS job” instead of the T-SQL job, even with the Windows proxy account. (same account as ssms login)
Declare @execution_id bigint
EXEC [SSISDB].[catalog].[create_execution] @package_name=N'SG_Excel.dtsx', @execution_id=@execution_id OUTPUT, @folder_name=N'ETL', @project_name=N'Report', @use32bitruntime=True, @reference_id=Null
Select @execution_id
DECLARE @var0 smallint = 1
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50, @parameter_name=N'LOGGING_LEVEL', @parameter_value=@var0
EXEC [SSISDB].[catalog].[start_execution] @execution_id
GO
PS First, the relative path of the network drive is applied, then it switches to the absolute path (\\ server \ folder). This is not a solution to the problem.