Scenario
I have one SSIS package which will loop through the list of SharePoint sites which loads the data from SharePoint lists to SQL Server. I deployed this SSIS package in my production server, and this package fails due to access issues of some SharePoint lists. The client wants to know the exact SharePoint site at which the package fails.
Solution
Logging is an important part of SSIS package development, so in this scenario we need to enable the log to debug errors in a package and we want to write a for Loop mapping variables in the log file to know at which point SSIS package gets failure.
In order to demonstrate the above scenario I created two tables in SQL Server, namely Source table and Destination table, source table contains one field with varchar data type which contains both integer value and string value. Destination table contains one field with integer data type.
In SSIS package I am going to loop through each and every row in Source table then insert the value into the destination so when I try to load the string value from source to destination table I will get an error. I want to know at which poin,t meaning at which value, I will get error.
Step 1
Below is the script to create and populate the values into the source table,
- --Creating Source table
- CREATE TABLE [dbo].[SourceTable]
- (
- [Column_Value] [varchar](10)
- )
- --Inserting values into Source table
- INSERT INTO [dbo].[SourceTable] VALUES
- ('100'),('200'),('300'),('400'),('500'),('Apple'),('Ball'),('Cat')
- --Creting Destination table
- CREATE TABLE [dbo].[DestinationTable]
- (
- [Column_Value] [int]
- )














SubashPosted Oct 7, 2016, 12:39 AM
Good share
RajaPosted May 31, 2016, 3:22 AM
Nice share...
Bhuvanesh MohankumarPosted May 30, 2016, 1:19 PM
Good one
Vignesh ManiPosted May 30, 2016, 9:35 AM
Good one
Thiruppathi RPosted May 30, 2016, 6:04 AM
good job..
Madhan RaghuPosted May 30, 2016, 3:12 AM
Thank you Humayun Kabir Mamun
Humayun Kabir MamunPosted May 30, 2016, 1:55 AM
Nice...