I have a Dynamic propeties task in dts 2000 that process/executes a global variable.
The global variable basically executes a bat file.
How do i set this up in ssis. The migration failed to properly convert this task.
Please help.
Thank you.
To execute a .bat file you would use the Execute Process task.|||I don't think I can use the process task because I have a global variable which gets set in a previous task. It is via this global variable that a bat file is called that copies a file from one location to another. The issue is that how do I execute the global variable. In dts sql 2000, the dynamice properties task is used. but in ssis that does not work. the process task does not allow you to execute/process aglobal variable....
hope I was able to explain better. Any help is appreciated.
Thanks
|||You'll have to use expressions on the Execute Process Task. You'll likely have to create two variables based off of your global variable first, though. That is, the execute process takes two arguments at a minimum, the executable (cmd.exe perhaps) and its arguments (your bat file). Then, just pass in the two new variables into the appropriate expressions (Executable & Arguments)|||Thanks Phil,
I understand what you said, but not quite sure how to do it...
my global varaible is called gv_commandline
the value is '\\......\..\.... .bat \\..............\\......... .txt \\............\\.............\\.... .txt
(batch file) (1st arg) (2nd arg)
basically the batch file will copy a file from the source (ie the 1st arg) to the destination (ie 2nd arg)
For instance, how do I set the two new variables with values from my global variable.
How do I set the expressions
Thanks in advance.
Jinita
|||
Jain wrote:
Thanks Phil,
I understand what you said, but not quite sure how to do it...
my global varaible is called gv_commandline
the value is '\\......\..\.... .bat \\..............\\......... .txt \\............\\.............\\.... .txt
(batch file) (1st arg) (2nd arg)
basically the batch file will copy a file from the source (ie the 1st arg) to the destination (ie 2nd arg)
Thanks in advance.
Jinita
Actually, just try putting your global variable in the expression for Argument. Right click on the Execute Process Task and select properties. Find the expression parameter and click on the "...". Find "Arguments" and in that box, just drag your global variable to it. Then, click out of that and double click on the execute process task to configure it. For the executable, type in: c:\windows\system32\cmd.exe|||
Thanks Phil,
That was awesome. Looks like it worked. the task seems to work, I will test the complete package run just to make sure everything works fine.
Great. Thank you so much.
Have a great weekend :)
Jinita
|||Hi Phil,
Apologise for reopening this issue, but I am having problems with the task. I have done what you suggested before, but when I try to execute that process task, it comes up with the cmd.exe window waiting for the command or argument. Shouldn't it take the argument and execute the whole thing. Please help.
Thank you.
|||I am still running into the same problem. Why does the command prompt come up. I am expecting it to execute the process task since i have already provided it with an executable and arguments.
Please advice.
Thanks in advance.
No comments:
Post a Comment