Set default values for variables in SSIS

Posted on 2008-10-30
Last Modified: 2013-11-10
Greetings all

I ma using a couple of variables in my package and need to know how best to set the default values.

Any thoughts?

In advance, thanks!!!

Question by:allanmark
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
  • 4
  • 3
LVL 22

Accepted Solution

PedroCGD earned 125 total points
ID: 22841967
You could use Package Configurations to do that.
Check this link:

I usually store values in XML config file and SQL Database.
Need more help?!
LVL 22

Expert Comment

ID: 22842003
Also see this:

If you are a beginner I can create a SSIS package to you! Let me know if you have more doubts!
LVL 17

Expert Comment

ID: 22842036
Best way to set the default values, in other words, the values from the beginning is to type the value into the "Value" column in the Variables window.
If you need to set the variable at runtime dynamically, I suggest any of these ways.
1. Use an Execute SQL Task to get the value from a database, the columns returned in the Select can be put into variables. See the Result Set window in the editor of the SQL Task. Pic below.
2. Use an expression to define the value of the variable. With the variable selected, go to the Properties window and set the EvaluateAsExpression to True, then write an expression to populate the value.
3. Get the value of the variable from a file. I can provide instructions for this if you like.
Does this help?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 17

Assisted Solution

HoggZilla earned 125 total points
ID: 22846967
OK, the HoggZilla document is done. Enjoy.
Populating Variables in SSIS

LVL 22

Expert Comment

ID: 22848967
Very good HoggZilla!!
LVL 17

Expert Comment

ID: 22848983
Thanks Pedro! Have a great day today and let's help some people. My email is in that doc, contact me if you like.
LVL 22

Expert Comment

ID: 22848994
Yes! I will do that! :-)

Author Closing Comment

ID: 31511699
Many thanks!  Really excellent support - it has been a great help!!

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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 retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

751 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