Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2012-08-24 : 11:09:53
|
| Hi,Is there a way to pass arguments and run an Execute Process Task from a VB Script Task in SSIS.Thanks! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-24 : 11:25:08
|
| hmm..whats the need for that?can you explain?why cant you set variable inside and call execute process task as next task in control flow?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2012-08-24 : 11:28:22
|
| Because the arguments will change every day.The files I need to download everyday using pscp, has a date in the name, so everyday the job runs, the files name changes with the yesterday date.Hope this helps clarify! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-24 : 12:09:24
|
quote: Originally posted by infodemers Because the arguments will change every day.The files I need to download everyday using pscp, has a date in the name, so everyday the job runs, the files name changes with the yesterday date.Hope this helps clarify!
thats fineBut for that too you can grab the values and store them in ssis variables and then pass them onto execute process task using expression builder. there's no need of calling it from script task.unless i'm missing something here?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2012-08-24 : 12:32:07
|
| So, I create a variable and then from the VB Script Task I set the value as --> Dts.Variables("strFileName").Value = RawData(i).ToString and then, how do i call the Execute Process Task and pass the variable as an argument in my VB Script Task?Uneless there is another way to do so! :-) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-24 : 15:16:14
|
quote: Originally posted by infodemers So, I create a variable and then from the VB Script Task I set the value as --> Dts.Variables("strFileName").Value = RawData(i).ToString and then, how do i call the Execute Process Task and pass the variable as an argument in my VB Script Task?Uneless there is another way to do so! :-)
it should be done inside execute process taskyou can do it in expression builder------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2012-08-24 : 16:34:33
|
| I got it now a different way. Reference this link --> [url=http://www.groupsrv.com/computers/about664056.html][/url]Yes I did get this resolved. It is kind of an ugly work around. The error is because I am getting prompted the first time I run SFTP from that MSSQL account, so Ihave to force in a "y" response. To do this I created a text file named "yes.txt" and inside of it i typed the word "yes". Then in my batch script I reference it to answer the prompt like so: psftp -P 23 192.168.1.251 -l myUserRed -pw mypasswordRed -b E:\Data\Test\Test2\ftp_commands\ftpScriptThatTransfersfiles.txt < E:\Data\Test\Test2\BCP\yes.txt exit |
 |
|
|
|
|
|
|
|