MS SQL 2000 - Parameters in DTSRUN using xp_cmdshell

I run the following: master..xp_cmdshell 'dtsrun / S ricmssql02 / U admindw / P letmein / N "scott - debug"' but also send parameters. For this I see the following: / A global_parameter_name: typeid = value And also that all this can be repeated to send multiple. My questions; What is a multiple separator? What are the values ​​for typeid or do I even need to?

0


source to share


1 answer


Although DTSRUN usually works without it, the values ​​for typeid are as follows:

Data type Type ID
-----------------
Integer (small) 2
Integer 3
Real (4-byte) 4
Real (8-byte) 5
Currency 6
Date 7
String 8
Boolean 11
Decimal 14
Integer (1-byte) 16
Unsigned int (1-byte) 17
Unsigned int (2-byte) 18
Unsigned int (4-byte) 19
Integer (8-byte) 20
Unsigned int (8-byte) 21
Int 22
Unsigned int 23
HRESULT 25
Pointer 26
LPSTR 30
LPWSTR 31 

      



I'm not sure what you mean by "multiple separator" - you need to have / A for every variable you want to replace. So, if you want to set three string variables in your example:

master..xp_cmdshell 'dtsrun /S ricmssql02 /U admindw /P letmein /N "scott - debug" /A "param1:8=string 1" /A "param2:8=string 2" /A "param3:8=string 3"'

      

+1


source







All Articles