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
Solved

How to handle Try/Catch error handling in Source task within a data flow

Posted on 2008-10-07
2
1,094 Views
Last Modified: 2013-11-10
Hi All

I have an SSIS package with a number of data flow tasks with OLE DB Source tasks that execute SP's.

I'd like SP to have the ability to return somewhat English-sounding error message if an error occurs within the SP.
Doing this within a SP using a TRY/CATCH block is no biggie, but I'm trying to figure out how to handle this within my SSIS data flow task.

As far as I can tell, with OLE DB Source tasks if there is any difference between what is returned, and what is pre-mapped to an OLE DB Destination task, SSIS will throw a runtime error, with different error properties that what would be trapped by a TRY..CATCH block within T-SQL.

Has anyone pulled this off?

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
2 Comments
 
LVL 11

Accepted Solution

by:
aaronakin earned 500 total points
ID: 22664205
Hi jimhorn,

I'm not completely sure I understand your question.  Yes, SSIS will throw the same error that your procedure throws.  Here's a test package to show you if it helps.

If you are wanting to actually catch that error, you're gonna need to use a script component with a try/catch block in it.
Test-Package.dtsx.txt
0
 
LVL 65

Author Comment

by:Jim Horn
ID: 23014537
>you're gonna need to use a script component with a try/catch block in it.
Pretty much the answer I was expecting, as SSIS doens't handle one schema for success, another schema for errors.

Thanks.
Jim
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

829 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