Execute SQL Task fails in SSIS package but runs successfully outside package
Hi, I created an execute sql task to save the filenames encountered in a Foreach Loop task into a database table, this works fine when I run the the individual task and it writes the filename to the database table (see below) ![alt text] However when i run the complete SSIS package, this task fails (see below) ![alt text] The error message I am getting is Error: String or binary data would be truncated. [Execute SQL Task] Error: Executing the query "insert into filename_staging_table (FileName) Val..." failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Also, this works perfectly fine in my test environment (windows 7, sql server 2008 r2) The issue only arises in my production environment (windows server 2003, sql server 2008 r2) Any guidance with this greatly appreciated....I am completely stuck!!!! Thanks : /storage/temp/558-execute+sql+1.jpg : /storage/temp/559-execute+sql+2.jpg
Put a breakpoint on the *ESQLT - Save File Name* task. This can be done by selecting it and then hitting F9. Then run the package. It will stop before the task with the breakpoint. Now you should be able to see the content of the package variables from the **Locals** window (Debug > Windows > Locals). This allows you to check if your variables content fits into the database column.