SSIS 2008 Quick Notes
These are some of the few things I’ve learned. These are very basic but it should save some newbies some time specially when dealing with Flat file sources and stored procedures.
Data Type on Text File
If you have a NVARCHAR column in your target table you have to set the data type of your source column to UNICODE STRING [DT_WSTR]. Don’t forget to adjust the data width accordingly to avoid “Truncation issue” in the execution.
I have set the columns that go to a DATETIME data type with DATABASE TIMESTAMP [DT_DBTIMESTAMP]. That works for me.
Stored Procedure Input Variable
This should be a non-issue because this is easy to figure out; but, this is a helpful tip to a newbie nonetheless.
When executing a parameterized stored procedure in a SQL TASK with OLE DB Destination (suppose we have a stored procedure with two variables):
Syntax will be “EXEC sp_MyStoredProc ?, ?” (without the quotes, of course). Then you create User Variables with appropriate data types & values at the Package Level (I guess this is called “Global Variables” in DTS). The next step is to map those variables inside the SQL TASK.
That is all. More notes to come.