Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to change source of an ssis package Expand / Collapse
Author
Message
Posted Monday, May 4, 2009 12:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 10, 2009 10:33 PM
Points: 3, Visits: 10
hi der,
i have a ssis package which imports data from a mdb file to SQL Table.
Is der any way to programmatically change the source file path in the package.

Like, say i've created a package which imports data from d:/someFile.mdb to a SQL Table.
now how can i change the path "d:/someFile.mdb" to something else as per req.

kindly help
Post #709206
Posted Monday, May 4, 2009 4:07 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, October 21, 2013 12:32 AM
Points: 2,556, Visits: 2,593
Look for Package Configurations in Books Online

--Ramesh

Post #709282
Posted Tuesday, August 21, 2012 6:52 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 12:04 PM
Points: 35, Visits: 98
As the other user suggested, this can be achieved easily through Configurations (inside your package).
So basically :

1)Create a variable (say FILE_LOC of datatype string)
Put the path in that variable ie assign the variable a value = your path.

2) 'Expressionize' your file connection manager ie In the properties of your file connection manager, go to expressions(click the ellipsis in expresiiosn) and set the expression as the variable created in step above.

3) Create a config file(you can also keep your package configs in database btw). Export this variable to a config file.
Now when you deploy your package to a diff env, just change the value of the said variable in the config file. The package should pick the path from the cofig file.

Hopw this helps.

Regards

Post #1348146
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse