Solved

SSIS Execute Package File Connection Help

Posted on 2014-11-19
3
133 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
SQL Server  2012 Release with lots of Enhancements in Database Engine functions, SSIS, SSRS and some of new services like Data Quality Server and Master Data Service. Of particular interest, and the focus of this Article is SSIS. So, time to elab…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now