August 21, 2015 at 7:22 am
Good day
I have a dtsx import script which import a delimeted csv file into a sql 2012 table.The default of the output lenght for all columns is set to 50 characters.All records which do not comply goes to another table in the same database.When I ran the script,all the records goes to the error table.I have now found a way to retrieve the column id and the error message to find that some column are been truncated and do not import.I now need to know which column is given the error.The import file have more than 300 columns and I do not want to go and check each column length.I am using visual studio 2010 and using visual basic.I have found a sample of C+,but the screen shots is very small and when I type in the command,i do not compile.
we have over 400 import scripts and I could really use this in all of them to trouble shoot.
Any samples in vb will be very much appreciated.
Thank you in advance.
August 21, 2015 at 7:48 am
Hi
Have you got any logging implemented on this package?
Br.
Mike
August 21, 2015 at 7:51 am
hi
how do I implement that,sorry I am still learning.
August 21, 2015 at 8:11 am
Don't worry, no one of us was born with the knowledge.
Please open your dtsx file in VS, click "SISS" from main menu and then "Logging".
Choose the provider type (eg. text file), set checkbox on your Data Flow
In "Details" you can set what events you want to log.
Save and run your package.
You can review the results in the log file after lunch the package.
Br.
Mike
August 21, 2015 at 8:26 am
hi
I have added the logging now.But I can not find any truncation.
This is a part of the log file
August 21, 2015 at 8:43 am
Hi
Did you set "OnError" and in Advanced "MessageText"?
You should see something like that:
#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
PackageStart,WSSERV01,CRP\db-operator,serial_items,{161366A8-72F3-42DE-B1C5-A58246F0B2DE},{573C819F-BD07-4393-9C1F-575DB96E7C8D},2015-08-21 16:35:29,2015-08-21 16:35:29,0,0x,Beginning of package execution.
OnError,WSSERV01,CRP\db-operator,Data Flow Task 1,{4D705608-04F3-48E2-B283-C3E4507665B5},{573C819F-BD07-4393-9C1F-575DB96E7C8D},2015-08-21 16:35:29,2015-08-21 16:35:29,-1071636319,0x,Data conversion failed. The data conversion for column "serial_code" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
Br.
Mike
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply