dbTalk Databases Forums  

DTS task fails no ERROR

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS task fails no ERROR in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nevlis
 
Posts: n/a

Default DTS task fails no ERROR - 01-17-2005 , 11:36 AM






I am calling a DTS from a stored proc.

when I FORCE a task to fail (testing) the following code
does not return an error...it will always return 0
therefore never going inside the if statement.

--Executing the Package:
EXEC @hr = sp_OAMethod @oPKG, 'Execute'
IF @hr <> 0
BEGIN
SET @strReturnMsg = '*** DTS Package Execute failed'
--EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN -1
END

I know the 'ActiveX' task fails because the DTS does not go on to
the next task a 'Bulk Insert'.


thanks

nevlis

Reply With Quote
  #2  
Old   
silven
 
Posts: n/a

Default Re: DTS task fails no ERROR - 01-17-2005 , 11:53 AM






Forgot to mention SQLSERVER 2000 sp.3

nevlis <silven (AT) removesilven (DOT) canada.com> wrote in
news:Xns95E17EBDB8F4Csilvencanadacom (AT) 206 (DOT) 167.113.5:

Quote:
I am calling a DTS from a stored proc.

when I FORCE a task to fail (testing) the following code
does not return an error...it will always return 0
therefore never going inside the if statement.

--Executing the Package:
EXEC @hr = sp_OAMethod @oPKG, 'Execute'
IF @hr <> 0
BEGIN
SET @strReturnMsg = '*** DTS Package Execute failed'
--EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN -1
END

I know the 'ActiveX' task fails because the DTS does not go on to
the next task a 'Bulk Insert'.


thanks

nevlis



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS task fails no ERROR - 01-18-2005 , 05:15 PM



In message <Xns95E181939CE73silvencanadacom (AT) 206 (DOT) 167.113.5>, silven
<silven (AT) removesilven (DOT) canada.com> writes
Quote:
Forgot to mention SQLSERVER 2000 sp.3

nevlis <silven (AT) removesilven (DOT) canada.com> wrote in
news:Xns95E17EBDB8F4Csilvencanadacom (AT) 206 (DOT) 167.113.5:

I am calling a DTS from a stored proc.

when I FORCE a task to fail (testing) the following code
does not return an error...it will always return 0
therefore never going inside the if statement.

--Executing the Package:
EXEC @hr = sp_OAMethod @oPKG, 'Execute'
IF @hr <> 0
BEGIN
SET @strReturnMsg = '*** DTS Package Execute failed'
--EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN -1
END

I know the 'ActiveX' task fails because the DTS does not go on to
the next task a 'Bulk Insert'.


thanks

nevlis


The package executed just fine, from a COM perspective, so no error is
detected where you expect. The failure of a package is internal to that
package and does not get throw all the way out again. You need to check
the execution result for each step to see if any steps failed within the
package.

For an example of doing this see the spExecutePKG and spDisplayPKGErrors
procedures here-

Archive
(http://www.sqldts.com/default.aspx?273)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
silven
 
Posts: n/a

Default Re: DTS task fails no ERROR - 01-19-2005 , 08:22 AM



Darren Green <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in
news:U2SmLBFMiZ7BFw3q (AT) sqldts (DOT) com:

Quote:
spDisplayPKGErrors
Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.