Hi folks, please can you help.
I have an Integration Services file package that calls another file package. The child package will always reside in the same directory as the parent package. In the connection manager for the child package I have simply specified the name of the child package not the full directory path so that the child package path is a relative path to the parent package. This all works perfectly when running the package from within Visual Studio however when running it using dtexecui it sometimes works and other times it fails with the error “the system cannot find the file specified”. Does anyone know what the reason for this inconsistency is? Alternatively is there a way to get the package path during runtime and dynamically set the path using the task expressions?
I can't explain why it sometimes works and other times does not.
There is no way to get the package path at runtime although i think this would be quite a nice feature. Possibly available in a system variable.
The way I get around this problem is documented here: http://blogs.conchango.com/jamiethomson/archive/2006/01/05/2559.aspx
Hope that makes sense.
-Jamie
|||
The reason relative paths don't work is because they are relative to the location of the application that runs the package. So, if the application you're running is in the right location, it will work. If not, the relative path points to a location that doesn't exist or at least, where the file doesn't exist.
K
|||Kirk you are absolutely right but the inconsistency of it was throwing me off. Fortunately I have now figured that out! As it turns out it is the way in which the package gets run that causes it to work or not work. When executing the package by double-clicking on it to bring up dtexecui it works perfectly, however when running dtexec or dtexecui from the command line it does not work! Makes perfect sense now that I can see that there is consistency!
Jamie I can’t seem to access your link at the moment but I will have a look at it because it sounds like it may be the only an alternative.
Thanks for your responses guys.
No comments:
Post a Comment