Use either the tworkbench or the messageprocessor command to run a job from the command line. The syntax for these commands is identical:
Tworkbench
DTSname /x
messageprocessor DTSname /x
Where DTSname is the name of the DTS file and x is one or more of the supported switches.
The following rules apply:
The syntax required to specify a variable in the command line depends on the type of variable, as follows:
The variable value must always be enclosed by 3 sets of double quotes, whether or not there are spaces in the variable. For example, if the Variable name is PromptVar and the value is "Modified value", then the command line statement is:
tworkbench "MyTest.dts" /TS="c:\Program Files (x86)%Public%\Public Documents\Scribe\Samples\Textdata\company.txt"/VPromptVar="""Modified Value""" /RS /C
For example, if the Variable name is PromptVar and the value is 200, then the command line statement is:
tworkbench "MyTest.dts" /VPromptVarNumber=200 /C /RS
The following example uses multiple variables, with a hyphen separating the variables:
tworkbench "MyTest.dts" /VPromptVarNumber=200 -VPromptedDate=TODAY() -VPromptVar="""Text Value""" -C -RS
Note that you can also use slashes to separate variables, as follows:
tworkbench "MyTest.dts" /VPromptVarNumber=200 /VPromptedDate=TODAY() /VPromptVar="""Text Value""" /C /RS
If quotation marks enclose a prompted variable that is passed from the command line, the quotation marks are stripped from the variable. To pass a quoted variable, use escape characters (\") before each quotation mark. For example, to pass "Hello_world" into a formula, use the following: "\"Hello_world\""
To specify that both connections in a DTS may contain Unicode data:
tworkbench "c:\program files (x86)\scribe\dtsfiles\myunicodedts.dts" /SS=mysourcedsn /SU=myusername /SP=mypassword /SN=Y /TU=mytargetusername/TP=mytargetpassword /TO="This DTS supports Unicode data" /TN=Y
Note: |
|
See also
Globally Changing Table or Field Names
Troubleshooting A Failed Connection