Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting job warning?? 2

Status
Not open for further replies.

Catadmin

Programmer
Oct 26, 2001
3,097
US
Has anyone seen this in SQL Server 2005?

I script a job as a CREATE to a new window. Disconnect from the current server, connect to the new server that I'm going to run it against. The job has 2 steps. The first step has an "ON SUCCESS" condition that directs it to Step 2.

I run the script and it scripts okay, but leaves me with a warning "Warning: Non-existent step referenced by @on_success_step_id."

Now, I did this with another job that had 8 steps, with another step referring to an "ON FAILURE" going to Step 8 and got the same message. Job runs fine, BTW. It just complains that the step doesn't exist for the On Success or On Fail.

Thoughts?



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Look at what the job does in each step based on succeed or fail. We have several jobs that have this error also, but it's intentional.
Step Name On Succeed On Fail
1 Reindex Go to 2 Go to 3

2 Shrinkdb Quit reporting Go to 3
success
3 Page DBA Quit reporting Quit reporting
failure failure

The above will give that error since you can't get to step 3 if steps 1 & 2 are successful.

-SQLBill

Posting advice: FAQ481-4875
 
That's normal when creating jobs. When it creates the job, it adds the steps in order. Step 1, then Step 2.

Step 1 says that on failure go to Step 2, but Step 2 hasn't been created yet. Basically the message is telling you that you need to create Step 2 or the job isn't going to work as you told it.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Okay. I just wanted to verify I wasn't going crazy.

Thanks, Guys. Stars for both of you.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
While you are going crazy, it's got nothing to do with scripting out a job.

:)

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
HA!!!!

Thanks, I needed that laugh this morning. @=)



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top