Apologies if this has been answered, but I've not been able to find an answer that solves my issue. I have a SSIS package that has a script task which references:
C:\Program Files (x86)\Common Files\microsoft shared\OFFICE16\MSO.DLL.
When executed through SQL Server Data Tools, the package runs as expected.
When deployed to Integration Services Catalogs, and manually executed, the package runs as expected. xp_cmdshell was then enabled.
When the package was executed using the command:
DECLARE @returncode INT;
EXEC @returncode = xp_cmdshell 'DTEXEC /ISSERVER "\SSISD
\test\test_DW_ETL\test_script_task.dtsx"'
it failed with the error message
Cannot Create ActiveX component
When another SSIS package, which doesn't have the Microsoft Objects reference in a script task, was executed using the same DTEXEC command, it ran successfully.
When the script task package is executed using the command:
DECLARE @returncode INT; EXEC @returncode = xp_cmdshell '@"C:\Program
Files\Microsoft SQL Server\120\DTS\Binn\DTExec.exe" /ISSERVER "\SSISDB
\test\test_DW_ETL\test_script_task.dtsx"'
to use the 32 bit DTEXEC, the package also fails with the error message
Cannot Create ActiveX component
I've tried changing the account that SQL Server is executed as, using a Local System, Local Service, Network Service, my own account and a service account - none of which seemed to make a difference.
My suspicion is that DTEXEC cannot access mso.dll.
This must be quite a common method, so I think I must be missing a fairly obvious step. Can anyone provide any assistance?
Thanks,
Ian
C:\Program Files\Microsoft SQL Server\120\DTS\Binn\DTExec.exe
hosts the 32-bit DTExec? Because on my machine, that hosts the 64-bit DTExec (as you'd expect); the 32-bit version should be atC:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe
– Jeroen Mostert