Solved

SSIS Execute Package File Connection Help

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

773 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