Which method should I use to execute an SSIS package remotely from a .net application?

我只是一个虾纸丫 提交于 2019-12-11 19:27:08

问题


I need to remotely execute an SSIS package located in the SSIS Package store from a C# .net application.

Application is located on a separate server, integration services cannot be installed on the app server.

I have the functionality working on my dev machine just using the file system method because I installed integration services to get it running. Now I need to flip it to call the package remotely.

Right now I'm using the following:

pkg = app.LoadFromDtsServer("\loadfile", "DBServer", Nothing)

But I get the following error:

"Connecting to the Integration Services service on the computer "DBServer" failed with the following error: "Access is denied." By default, only administrators have access to the Integration Services service. On Windows Vista and later, the process must be running with administrative privileges in order to connect to the Integration Services service. See the help topic for information on how to configure access to the service."

Certainly the user running this application in production will not be granted such rights on the database server. How can I make this run as a sql user? Is this the right way to go about this? There are other options, I know. The package does not absolutely have to be stored in the package store, but I believe this is best practice.

I should also mention that the application passes in a file name via a package variable, so any solution needs the ability to do that as well. I'm not sure how to do this if I create a job to run the package.


回答1:


If you are passing parameters from the .NET application to the SSIS package, check the following link for options:

How to execute an SSIS package from .NET?

If no parameters are being passed, then an easier approach would be to add the SSIS package to a job and then call the job from the .NET application. The following link provides a code example:

http://www.roelvanlisdonk.nl/?p=1736




回答2:


you can use stored procedures in the SSIS catalog to deploy the project and execute the packages

https://msdn.microsoft.com/en-US/library/jj820152.aspx?f=255&MSPPError=-2147217396



来源:https://stackoverflow.com/questions/30765566/which-method-should-i-use-to-execute-an-ssis-package-remotely-from-a-net-applic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!