SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to change source of an ssis package


how to change source of an ssis package

Author
Message
dsouza.benita
dsouza.benita
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
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
Ramesh Saive
Ramesh Saive
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10234 Visits: 2643
Look for Package Configurations in Books Online

--Ramesh


n79799
n79799
SSC Veteran
SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)

Group: General Forum Members
Points: 276 Visits: 122
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search