Customizing error Handling in SSIS
Hi i have an requirement from User to customize the error that are logged by SSIS.. For example SSIS logs the following error when some problem occurs while converting SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "Microsoft Cursor Engine" Hresult: 0x80040E21 Description: "Multiple-step operation generated errors. Check each status value.". There was an error with input column "CREATED_DATE" (3941) on input "OLE DB Destination Input" (917). The column status returned was: "The value could not be converted because of a potential loss of data.". SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (917)" failed because error code 0xC0209077 occurred, and the error row disposition on "input "OLE DB Destination Input" (917)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "ERROR LOG" (904) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0209029. There may be error messages posted before this with more information on why the thread has exited. The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Get Account File" (1) returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited. This is at very high level The User do not understand this erro... The always come back to developer to know what exactly the error message is all about. i would like to customize this kind of errors and inform user that .. this error is because of convertion.. how would i trap this kind of errors... Please let me know any possible solutions on customizing errors in SSIS Sri
July 29th, 2011 11:30am

For capturing logging and error you can try this, http://www.mssqltips.com/tip.asp?tip=2149 Hope it helps!Thameem
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2011 11:43am

you can use event handlers, and use OnError event handler, in the OnError event handler you can use script task or execute sql task to customize error handling and use System::ErrorCode and System::ErrorDescription variables and create customize error messages based on them.http://www.rad.pasfu.com My Submitted sessions at sqlbits.com
July 30th, 2011 5:50pm

Better you create your own tables and handle these error. Please check the Jamie's blog on it: Let us TRY this | Mail me My Blog :: http://quest4gen.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
August 1st, 2011 2:13am

Is there any way to trap the error row line number in SSIS.. End users always complain the error message is not user friendly.. They want to let them know the line number in flat file so as to fix the error and re process it. The package always has a problem while convertions i.e in Conversion component we always get an error of conversion failures.. So my requirement would be to trap the line number along with the error. is there any way to do this?? Sri
August 2nd, 2011 11:43pm

The preferred method of dealing with these problems is to use error redirection. You send the rows that have issues to a secondary repository for humans to address. Configure the Error Output of the components (the Destination, in this case) to send the rows to another table, or flat file. You can decode the ErrorColumn and ErrorCode by using script like this. Or you can use a custom component like this. Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
August 3rd, 2011 2:58am

As Todd explained you can use CONFIGURE ERROR OUTPUT, and redirect error rows to another flat file destination. after running the package, you can check that flat file to find bad data rows. But ; this doesn't catch row number, in the SSIS data flow there is no built-in transform for row number, but you can use a simple script component to add a row number column to data stream . this is a sample of it: http://support.microsoft.com/kb/908460 http://www.rad.pasfu.com My Submitted sessions at sqlbits.com
August 3rd, 2011 6:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics