Avatar of canuckconsulting
Flag for United Kingdom of Great Britain and Northern Ireland asked on

How to referrence project parameters in a SSIS Package

I have an SSIS Package I use to import data from two databases having the same table.  In my destination table I have a field DB_ID which indicates which database the row came from.  I was wanting to have this populated from a project parameter I would set at time of import.

Is this the best way to do this and, if so, how can I reference a project parameter from within my data flow task?
Microsoft SQL ServerMicrosoft SQL Server 2008SSRSSSIS

Avatar of undefined
Last Comment

8/22/2022 - Mon

use drived column transformation in your data flow to assign the package parameter values as input to the destination

Hi ,
  One more thing , project parameters do not have an expressions property to define their value.  They are intended to hold a literal value which does not change while the package executes.

so as per your requirement you need to use variables instead of Parameters .My suggestion is get the DB ID from the SQL statement
"select      dbid
            from      master.dbo.sysdatabases
            where      [Name] = @databaseName "

 and then assign to the variable .Then go with the drived column what i mentioned above .

Parameter and variable difference:


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck