9.13.2012

DT_STR vs DT_WSTR data types

Difference between DT_STR and DT_WSTR data types in SSIS

S.No
DT_STR
DT_WSTR
1
Definition:
A null-terminated ANSI/MBCS character string with a maximum length of 8000 characters. (If a column value contains additional null terminators, the string will be truncated at the occurrence of the first null.)
Definition:
A null-terminated Unicode character string with a maximum length of 4000 characters. (If a column value contains additional null terminators, the string will be truncated at the occurrence of the first null.)
2
When DT_STR can be used ?
When data is in ANSI code then SSIS package takes the data type as DT_STR.
When DT_STR can be used ?
When data is in Unicode then SSIS package takes the data type as DT_WSTR.
3
How DT_STR can be mapped in SQL Server ?
DT_STR data type in SSIS can be mapped to Char or VarChar data types in SQL Server.
How DT_STR can be mapped in SQL Server ?
DT_WSTR data type in SSIS can be mapped to nChar or nVarChar or Sql_Variant or image data types in SQL Server.

References:




1 comment: