简体   繁体   English

SSIS相对文件路径,用于在执行包任务上引用.dtsx文件

[英]SSIS Relative File Path for referencing .dtsx files on a execute package task

Hi I have an SSIS package in which i have a main package that references child packages, is there a way I can make the location path external using a Relative path or just the file name. 嗨,我有一个SSIS软件包,其中有一个引用子软件包的主软件包,有没有一种方法可以使我使用相对路径或仅使用文件名将位置路径设置为外部。 I cant use the full C: drive path as this is subject to change. 我无法使用完整的C:驱动器路径,因为这可能会发生变化。

yes, but you have to find a way of changing the current working directory of the execution of the package. 是的,但是您必须找到一种方法来更改程序包执行的当前工作目录。 I worked at one place where we ran bat files to execute the packages and the first line used cd to set the working directory to the folder location of the parent package. 我在一个运行bat文件以执行软件包的地方工作,第一行使用cd将工作目录设置为父软件包的文件夹位置。 I think I've also seen people use a script task inside the parent package to set the working directory based on the runtime location of the parent package. 我想我也看到人们在父包中使用脚本任务来根据父包的运行时位置设置工作目录。

http://www.artisconsulting.com/blogs/greggalloway/2008/7/13/relative-paths-in-ssis http://www.artisconsulting.com/blogs/greggalloway/2008/7/13/relative-paths-in-ssis

根据我的发现,最好使用项目引用系统而不是文件引用,并且如果部署到SSISDB而不是MSDB,则可以引用任何项目文件,它比MSDB更好,并且能够与打包参数更容易

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM