Re: Execute SQL Task Error Capturing
From: Darren Green (darren.green_at_reply-to-newsgroup-sqldts.com)
Date: 07/06/04
- Next message: Allan Mitchell: "Re: Importing various formats on same interface file"
- Previous message: Darren Green: "Re: Why when I import Access 2000 queries into SQL Server they come over as tables?"
- In reply to: whornak: "RE: Execute SQL Task Error Capturing"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 6 Jul 2004 18:02:43 +0100
In message <3D7C9B1A-B1EA-40FD-B1CD-6F105AF5C089@microsoft.com>, whornak
<whornak@discussions.microsoft.com> writes
>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
- Next message: Allan Mitchell: "Re: Importing various formats on same interface file"
- Previous message: Darren Green: "Re: Why when I import Access 2000 queries into SQL Server they come over as tables?"
- In reply to: whornak: "RE: Execute SQL Task Error Capturing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|