Command Line Switches

Use command line switches to run the Workbench on a single target from the command line. You can use either the tworkbench or messageprocessor command. The syntax and switches for both commands are identical.

Command line switches are applied to the connections as they are defined in the Workbench:

Example

tworkbench c:\myjobspec.dts /SS=mysourcedsn /SU=myusername /SP=mypassword /TU=mytargetusername/TP=mytargetpassword /TO="other info separated by spaces" /TL=3 /C /RS

Switch Description

/C

Passes command line connection information to all chained jobs.

/R

Runs the job.

 

/RS

Runs the job in silent mode, in which any messages that might pause processing are suppressed.

Source Switches

/SA=<other adapter info>

Specifies the source adapter connection parameters, <other adapter info>.

To find the parameter that you want to replace in the source connection:

  • Open the DTS file with DTS Edit.
  • From the Data Providers Tab, find the Adapter Property Name column in the Source section.
  • Find the property you want to replace.
  • On the command line, enter the property name as follows:

    /SA=<AdapterPropertyName>=<Value>

    For example, to enter the email recipient of an xml message:

    /SA=SMTPTo=joandarcy@email.com

/SD=<dbname>

Specifies the source database name, <dbname>.

/SL=<library code>

Specifies the source access library, <library code>. Values are:

  • 1=ODBC
  • 5=SQLServer

/SN=<Y/N>

Specifies if the source connection may include Unicode data. Values are:

  • Y = Source connection may include Unicode data.
  • N = Source connection will not include Unicode.

Notes:

  • <T/F> or <1/0> are also valid parameters.
  • If /SN is set to Y, T, or 1, make sure your source connection supports Unicode.
  • Make sure your source and target connections provide the same level of Unicode support. Inserting Unicode data into a non-Unicode target may produce unexpected results.

/SO=<other info>

Specifies other source connection parameters, <other info>.

/SP=<password>

Specifies the source password, <password>.

/SS=<servername>

Specifies the source server name or data source name, <servername>.

/SU=<username>

Specifies the source user name, <username>.

Target Switches

/TA=<other adapter info>

 

Specifies connection parameters from a specific adapter, <other adapter info>. The available parameters depend on the target connection.

To find the parameter that you want to replace in the target connection:

  • Open the DTS file with DTS Edit.
  • From the Data Providers Tab, find the Adapter Property Name column in the Target section.
  • Find the property you want to replace.
  • On the command line, enter the property name as follows:

    /TA=<AdapterPropertyName>=<Value>

    For example, to enter the email recipient of an xml message:

    /TA=SMTPTo=joandarcy@email.com

/TD=<dbname>

Specifies the target database name, <dbname>

Notes:

  • Only use this switch for SQL connections.
  • For ODBC connections, use the /TS switch.

/TL=<library code>

 

Specifies the target access library, <library code>. Values are:

  • 1=ODBC
  • 5=SQLServer

/TN=<Y/N>

Specifies if the target connection may include Unicode data. Values are:

  • Y = Target connection may include Unicode data.
  • N = Target connection will not include Unicode.

Notes:

  • <T/F> or <1/0> are also valid parameters.
  • If /TN is set to Y, T, or 1, make sure the target connection supports Unicode.

/TO=<other info>

 

Specifies other target connection parameters, <other info>.

 

/TP=<password>

Specifies the target password, <password>.

/TS=<servername>

Specifies the target server name or data source name, <servername>.

Notes:

  • Use this switch for ODBC connections.
  • For SQL connections, use the /TD switch.

/TU=<username>

Specifies the target user name, <username>.

/V<myvar>=<value>

 

Specifies a prompted variable, <myvar>, and variable value, <value>.

If quotation marks enclose a variable that is passed from the command line, the quotation marks are stripped from the variable. To pass a variable with quotation marks, use escape characters (\") before each quotation mark. For example, to pass "Hello world" into a formula, use the following: "\"Hello world\""

See also

Running a Job from the Command Line