[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

SSIS 2005 - How to identify the colum causing the error in OLEDb Destination component

Posted on 2011-03-12
6
Medium Priority
?
1,079 Views
Last Modified: 2012-05-11
Can anyone tell me how to identify the specific column name that is causing an error when attempting to insert a data flow into an OLEDB Destination component?  I am attempting to create a lot which specifies the error that occurred and the field name that caused the error.  I am able to get the column ID, but I don't know how to translate this into a meaningful column name.  Example:  I get an "error field" value of 6581.  I don't know which field is represented by 6581, so I don't know what column is causing the problem.  I checked the sys.columns and sys.all_columns views to see if the column_id referenced by SSIS was perhaps one of those values, but I could not find anything useful there.

Below is a sample of code that is our best attempt at the moment to figure this out, but it seems really ugly.  I'm using a script task and hard-coding to convert the error column id into an error column name.

I'm sure there is a better way to do this with no hard-coding.

P


Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
        '
        ' Add your code here
        '

        Row.ErrorDescription = ComponentMetaData.GetErrorDescription(Row.ErrorCode)
        If Row.ErrorColumn = 6581 Then
            Row.ErrorColumnName = "SUBMISSION_ID"
        Else
            Row.ErrorColumnName = Row.ErrorColumn.ToString()

        End If
    End Sub

End Class

Open in new window

0
Comment
Question by:jbaird123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:jbaird123
ID: 35123459
dbaSQL:  Thanks for the information, but this does not quite answer my question.  The first article explains how to get the error description - which I am already doing.  The second article appears to be showing how to extract the data from all fields in the data flow, but it does not show how to identify which column caused the error.

There is an ErrorColumn field which identifies the column that caused the error, but the value in this field is something cryptic like "6851".  I don't know how to figure out which field in the data flow is represented by "6851".  

Can you explain how to figure this out?  It seems like there should be an easy solution for something like this.  

Thanks.
0
 
LVL 17

Accepted Solution

by:
dbaSQL earned 2000 total points
ID: 35123620
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 17

Assisted Solution

by:dbaSQL
dbaSQL earned 2000 total points
ID: 35123630
Also looks like these guys did the same thing you're trying to do:
http://www.sqlservercentral.com/Forums/Topic456102-148-1.aspx
0
 

Author Closing Comment

by:jbaird123
ID: 35159053
Thank you. The code at http://eod.codeplex.com/ is very helpful for implementing these solutions.
0
 
LVL 17

Expert Comment

by:dbaSQL
ID: 35159133
Excellent.  Glad you got it worked out.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question