I am able to execute some SSIS packages from my local computer however when I am trying to execute the same through windows service on Windows server R2 it fails. Windows Service Code:
using DTS = Microsoft.SqlServer.Dts.Runtime;
DTS.Package pkg;
DTS.Application app;
DTS.DTSExecResult pkgResults;
app = new DTS.Application();
pkg = app.LoadPackage(pkgLocation, null);
pkgResults = pkg.Execute();
I am installing the service on the server and when started it fails on app = new DTS.Application();
On the server I have already SSIS installed and I am also able to execute the Package from command prompt. The complete error message is :
Microsoft.SqlServer.Dts.Runtime.DtsComException:
An Integration Services class cannot be found. Make sure that Integration Services is correctly installed on the computer that is running the application. Also, make sure that the 64-bit version of Integration Services is installed if you are running a 64-bit application. --->
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at Microsoft.SqlServer.Dts.Runtime.Application..ctor() --- End of inner exception stack trace --- at Microsoft.SqlServer.Dts.Runtime.Application..ctor()
Any help on this?
It seem that you have installed the 32-bit version of SSIS, according to this article 64 bit Considerations for Integration Services if you run it from command prompt the 32-bit version will be used even if the 64-bit version is installed
By default, a 64-bit computer that has both the 64-bit and 32-bit versions of an Integration Services command prompt utility installed will run the 32-bit version at the command prompt. The 32-bit version runs because the directory path for the 32-bit version appears in the PATH environment variable before the directory path for the 64-bit version. (Typically, the 32-bit directory path is :\Program Files(x86)\Microsoft SQL Server\100\DTS\Binn, while the 64-bit directory path is :\Program Files\Microsoft SQL Server\100\DTS\Binn.)
Now i believe that your service is built against 64-bit, which made the SSIS package request the 64-bit version and it didn't find it.
So you either change it to run as 32-bit or install the 64-bit version of Integration Services.
User contributions licensed under CC BY-SA 3.0