Solved

SSIS Execute Package File Connection Help

Posted on 2014-11-19
3
145 Views
Last Modified: 2016-02-11
Hello all,

Hoping this is simple.   I have an SSIS package that I need to deploy to a batch server.   I found a sample one that I am using and modified.   I have a Master package master.dtsx and in that package I am writing to a log then running multiple other packages then logging completed in the master package.   So I have three Execute Package Task Editors that use three connections in the connection manager that are the other packages.   The sample I have has a variable in the master package called "BasePath" that I have been filling out with my C: drive path to the solution.   All these packages are under the same folder.   In the master package code it shows for example:


<DTS:Property DTS:Name="CreationName">FILE</DTS:Property><DTS:PropertyExpression DTS:Name="ConnectionString">@[BasePath] + "CDCCashflow.dtsx"</DTS:PropertyExpression>

Stupid question is can I just have it look in the same root path for the files instead of having to enter in a base path to get it to run?   This way I don't have to enter in a hard path.
0
Comment
Question by:sbornstein2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40454540
You can use a parameter instead of a variable, and even have a default value for the parameter for use at design time.

See this web page for more information: http://msdn.microsoft.com/en-us/library/hh213296.aspx 

This way, you can pass the parameter into the expression rather than having to use a hard path.
0
 
LVL 16

Expert Comment

by:DcpKing
ID: 40454882
Phillip is correct. In addition, you could also consider keeping your paths in a table and populating the values at runtime using the Execute SQL task (see Microsoft docs here). This approach would allow you to change locations in the future without changing the packages.

Once you do that, of course, you can extend the concept logically by keeping a list of the packages you want to run in a table, and have your Master package read the table to  see what other packages to run, rather than hardcoding the package naes, etc., into the Master ...

Have fun!

hth

Mike
0
 

Author Closing Comment

by:sbornstein2
ID: 40461897
thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question