How to set database name as variable in SSIS?

In my current project, the database name changes, and I do not want to change my OLE DB sources every time. So I want to set it as a variable. That is, in every OLE DB source I could use it as a parameter. However, it seems that SSIS does not allow passing the database name as a parameter. So what should I do to minimize my changes?

I want to do something like this SQL statement in OLE DB Source:

Select OrderID
  From ?.Order

And I just need to change my variable when changing the database name. Thanks for any solutions!

+5
source share
4 answers

enter image description here

" " .

XML, .

+3

\Instance.Database Schema.Table View . . , , ( ConnectionName ConnectionString ConnectionString). , SSIS .

SSIS Connections - 2005, 2008 2008 R2; 2012 . SSIS ( ).

, .

Andy

0

Check out this awesome post on how to parameterize a database name. This is a very detailed blog post on the topic of settings and environments in SSIS.

http://www.sqlchick.com/entries/2015/1/4/parameterizing-connections-and-values-at-runtime-using-ssis-environment-variables

0
source

All Articles