How to call a SSIS package that generates files remotely?

时间:2016-08-31 17:04:55

标签: ssis

I want to know how can I call an SSIS from a computer, that is not the SQL server.The SSIS generates multiples files as output and I need those files to be saved on the same computer where I called the package.

Integration Services is not installed on the remote computer from which the package should be called.

What are my options?

Edit 1: Is not the same question as Is it possible to execute an SSIS package remotely? because I want to know what are my options knowing that the SSIS package generates some files and I want these files be saved to the computer that is calling the package.

Any help would be apreciated

2 个答案:

答案 0 :(得分:0)

Two viable options are using DTEXEC, either via a bat file or powershell script.
Link for DTEXEC: https://technet.microsoft.com/en-us/library/ms162810(v=sql.105).aspx
Link for DTEXEC and Powershell: http://www.databasejournal.com/features/mssql/ssis-2012-using-powershell-to-remotely-execute-file-system-packages.html

答案 1 :(得分:0)

No matter how you execute the package whether you use DTSExec or SQL Agent Jobs if you want to execute the package on the SQL server not the local machine you will have a problem of Security context and access to a directory/location on the local computer. you may also have firewall, routing, and more problems as well.

With DTSExec the security context will be that of the user that executes the job, where as with SQL Agent the context will be that of the SQL Agent Service Account. So based on your answer one or more of these accounts will need Read\Write permission to the local computer and the ability to contact it (e.g. no firewall/routing/DNS issues).

next your package has to know where to save the job to, which can be done using variables but you will have to pass the directory as a parameter/variable when executing the package because if the package is executed remotely it will not have any knowledge of your computer being the initiator of it. Your Directory Path would have to be to a share setup on your computer or use the administrative share such as \computername\C$\folderlocation or \192.168.0.1\c$\folder location.

If you use DTSExec you likely won't have to worry about the security context as much because the assumption is you would run as the logged in user to the computer which should have access. But you still have the problem of letting SSIS know where to copy the files. If you execute DTSExec by powershell remote commands you could just use powershell to copy the files from a staging location and not have to worry about the SSIS package configuration.