Solved

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

Posted on 2008-10-07
2
1,086 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to save view in SSMS 21 61
TSQL DateADD update Question 4 32
Help Parsing a String with SQL Syntax 23 33
Replace Dates in query 14 21
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now