-
Copying Jobs by Scripting
I am trying to copy a job by scripting it out and running the script. I am getting these errors:
Warning: Non-existent step referenced by @on_success_step_id.
and
Warning: Non-existent step referenced by @on_fail_step_id.
What's up with that?
Is it possible to copy a job onto the same server?
Thanks!
Ellen
-
Copying Jobs by Scripting (reply)
When you create a job (read job step), you specify what you want to happen
when that job step completes. In some cases what is specified is something like
"on success goto next jobstep".
What I am guessing is that the jobs you are scripting are not really "technically"
setup correctly. i.e. there may be no next jobstep, and what should be selected
is "quit job reporting success" or "quit job reporting failure".
Thus you script them, run them and get the errors you reported.
HTHs Gary
------------
Ellen at 11/8/00 3:43:15 PM
I am trying to copy a job by scripting it out and running the script. I am getting these errors:
Warning: Non-existent step referenced by @on_success_step_id.
and
Warning: Non-existent step referenced by @on_fail_step_id.
What's up with that?
Is it possible to copy a job onto the same server?
Thanks!
Ellen
-
Copying Jobs by Scripting (reply)
My guess is similar, only in reverse. I think on creating the first step, which jumps to the third step on success, it can't find the third step because that part of the script has not run yet.
Make sense?
------------
Gary Andrews at 11/8/00 4:33:14 PM
When you create a job (read job step), you specify what you want to happen
when that job step completes. In some cases what is specified is something like
"on success goto next jobstep".
What I am guessing is that the jobs you are scripting are not really "technically"
setup correctly. i.e. there may be no next jobstep, and what should be selected
is "quit job reporting success" or "quit job reporting failure".
Thus you script them, run them and get the errors you reported.
HTHs Gary
------------
Ellen at 11/8/00 3:43:15 PM
I am trying to copy a job by scripting it out and running the script. I am getting these errors:
Warning: Non-existent step referenced by @on_success_step_id.
and
Warning: Non-existent step referenced by @on_fail_step_id.
What's up with that?
Is it possible to copy a job onto the same server?
Thanks!
Ellen
-
Copying Jobs by Scripting (reply)
I don't know if the following is happening, but here is what I would expect given the scenario
that you have a job with say three steps:
The scripting of this job creates the information needed to completely recreate
the job. (all three steps)
Thus, I would not expect the error message until all three steps have been processed.
I know I have created jobs where I have not got the step "branching" technically correct.
When I try to close out that work, usually by clicking an OK button, I get a pop-up window
advising me of the problem and asking me if that is what I want. It never is what I want
and I go back and correct the "branching" problem.
I am not sure, but I would guess that the scenario you describle would only be correct
if the script was not trying to create all the steps.
You can validate/test the job in error by doing the following:
1. Use EM (Enterprise Manager)
2. click management in left pane
3. click sql server agent in left pane
4. double click jobs in left pane (this will show all your jobs in right pane)
5. in right pane, right click job you are having a problem with, then select "properties" from drop down
6. click steps tab
now for each step in job
7. click step
8. click edit button
9. click advanced tab
10. make sure "branching" choices are correct.
I don't know that the following is a problem, but recommend you not do it.
For the last step in a job, use "goto next step" (since there is no next step).
HTHs Gary
------------
Ellen at 11/8/00 4:47:24 PM
My guess is similar, only in reverse. I think on creating the first step, which jumps to the third step on success, it can't find the third step because that part of the script has not run yet.
Make sense?
------------
Gary Andrews at 11/8/00 4:33:14 PM
When you create a job (read job step), you specify what you want to happen
when that job step completes. In some cases what is specified is something like
"on success goto next jobstep".
What I am guessing is that the jobs you are scripting are not really "technically"
setup correctly. i.e. there may be no next jobstep, and what should be selected
is "quit job reporting success" or "quit job reporting failure".
Thus you script them, run them and get the errors you reported.
HTHs Gary
------------
Ellen at 11/8/00 3:43:15 PM
I am trying to copy a job by scripting it out and running the script. I am getting these errors:
Warning: Non-existent step referenced by @on_success_step_id.
and
Warning: Non-existent step referenced by @on_fail_step_id.
What's up with that?
Is it possible to copy a job onto the same server?
Thanks!
Ellen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|