?
Solved

SSIS Execute Package File Connection Help

Posted on 2014-11-19
3
Medium Priority
?
149 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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

770 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