dbTalk Databases Forums  

Re: Execute SQL Task Error Capturing

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


Discuss Re: Execute SQL Task Error Capturing in the microsoft.public.sqlserver.dts forum.



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

Default Re: Execute SQL Task Error Capturing - 07-06-2004 , 12:02 PM






In message <3D7C9B1A-B1EA-40FD-B1CD-6F105AF5C089 (AT) microsoft (DOT) com>, whornak
<whornak (AT) discussions (DOT) microsoft.com> writes
Quote:
I did figure out that when running the tasks manually the progress
window that stays open when done does contain the messages associated
with the tasks. Is there a way to access that object?

"whornak" wrote:

I want to build error capturing and reporting into the DTS packages.
I am currently using 'Execute SQL Task' and sending emails when the
SQL Statement fails. What I want to do is provide the recipient with
as much detail as possible about the error.

How would I capture the actual error messages when a statement fails?
Four ways to get error details -

Use GetExecutionErrorInfo method for the step, but this is only an
option in strong typed code, such as VB, not VBScript.

Execute package WithEvents and capture the OnError events.

Log errors to a file, package level option. Note error file is not
available during the current package execution.

Log errors to SQL Server, package level option. You can access the
current execution by using the lineage Id global variables, see package
level option. Still probably done easier post execution or in a parent
package.

--
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
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.