|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, June 16, 2010 2:08 PM
Points: 6,
Visits: 42
|
|
I have a package with 3 control flow tasks all enclosed in a sequence container. For each of these taks I have added a script flow task in the "OnError" event handler. I am trapping the error in a variable.
To the sequence container I have added a script task which takes the value from this variable and sends an email.
However the error message I receive is repeated 3 times even though only one of the tasks has the error. Is it because all the script tasks have the entry point as "ScriptMain".
Can we have mutiple script tasks with the same entry point? Please advice how to proceed.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
Joseph, I'm sorry, I'm having trouble visualizing what you are describing. Could you post a screen print of the package? I think that will be enough..
CEWII
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,242,
Visits: 9,494
|
|
We need to understand a bit more about the logical flow of your package, I think.
You can easily check out your Script Main suspicion - just try changing it to be unique (and changing the entry point).
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, June 16, 2010 2:08 PM
Points: 6,
Visits: 42
|
|
The attached doc file shows the layout. This contains 2 SQL Exceute tasks. For each of these tasks the on error event contains a Script task to collect the error and place in a variable.
The Collect All Errors (Script task) collects the errors and sends an email. In this situation the error is repeated twice.
I have even changed the Class Name in the script tasks, to something other than ScriptMain, and also the entry points but I still get the message repeated.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,242,
Visits: 9,494
|
|
Surely your e-mail task needs to be outside of the Sequence container, after the Collect All Errors task?
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, June 16, 2010 2:08 PM
Points: 6,
Visits: 42
|
|
| The email is outside the sequence container. The script task "Collect All Errors' collects all the errors and sends the email
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
Ok, I have a better idea..
Every script task is effectively its own "class" there shouldn't be any issue with each having its own ScriptMain..
So I don't think that is your problem...
CEWII
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,242,
Visits: 9,494
|
|
So what do Email_Start and Email_Success do?
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, June 16, 2010 2:08 PM
Points: 6,
Visits: 42
|
|
The Email Start just sends an email that the package has started and the Email Success sends an email if the job completed successfully
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,242,
Visits: 9,494
|
|
Have you tried debugging the Script Task to see whether that gives you any clues about what is happening?
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|