October 1, 2011 at 9:47 pm
i have one package that package scheduled by daily 6 am but the job is failed at saturday.the what i need to do where we go how to resolve
October 3, 2011 at 1:13 am
Step 1: Understand the cause of failure
Step 2: Take precautionary measures, if the error occurs again
Step 3: Relax 🙂
Raunak J
October 4, 2011 at 8:41 am
OK here is what we do. Use Event Handler for the package to send email using sql server (if it is configured):
Here is the code you can paste into a sql task.
DECLARE @MSG AS VarChar(2000)
DECLARE @CrLf AS Char(2)
DECLARE @Subject VarChar(200)
SET @CrLf = Char(13) + Char(10)
SET @Subject = 'FAILURE - ' + @PackageName
SET @MSG = @PackageName + ' failure. ' + @CrLf +
'This message was triggered by Event Handler processing for the OnError event. ' + @CrLf +
'Here information from the system variables: ' + @CrLf +
'MachineName (System) : ' + @MachineName + @CrLf +
'TaskName : ' + @TaskName + @CrLf +
'SourceName : ' + @SourceName + @CrLf +
'SourceDescription : ' + @SourceDescription + @CrLf +
'ErrorCode : ' + @errorcode + @CrLf +
'ErrorDescription : ' + @ErrorDescription + @CrLf +
'EventHandler Trigger Time : ' + @ErrorTime
EXEC msdb.dbo.sp_send_dbmail
@recipients=N'person@somewhere.com',
@subject=@Subject,
@body=@MSG
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply