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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Job Failed ?

Status
Not open for further replies.

itsmarkdavies

Programmer
May 22, 2001
87
GB
I have a Job that runs on SQL Server 2000. The Job contains 2 Steps that report "The Step Succeeded".
However, the overall Job outcome reports "Failed" every time the Job is run.

I have checked the results of the 2 Steps in the Job, and they do run completely successfully.
Has anyone else come accross / found a reason for this problem ?

Thanks. itsmarkdavies@hotmail.com
 
Check your last step to make sure it is set to 'Quit the job reporting success'. (Enterprise manager, go to Jobs, go to the properties of the job, double-click on the last step, select the advanced tab and check the first line). If the last step is set for 'Go to next step' and there isn't a next step, then it will report a failure.

Another way to check on what may have caused the failure: go to the job in Enterprise Manager, mouse-right on the job and select 'View Job History'. That might give you some indication of why the job failed.

-SQLBill
 
Thanks for that SQLBill.

You were right, the last step was set to "Quit Reporting Failure" if it succeeded ! Oops. itsmarkdavies@hotmail.com
 
Perhaps I should start a new thread but will start here.

We're running scheduled SQL Maint jobs which submit a batch file (.bat) using 'xp_cmdshell'. The batch contains a command line, which runs an application to load data to a table.
Periodically (every 3 to 10 successful runs) the command line (written to a batch log file) will not indicate execution nor provide the usual results message (in other words, it didn't run). However, the SQL job indicates success. In fact, nowhere is there any error messages (SQL log, application log). Time of day makes no difference. This started about mid March. Previously all ran fine.

Regular maintenance plans (DB backup, etc) run fine, as do DOS file copy jobs submitted by xp_cmdshell.

Temporary work around is to stop/start SQL Server (also cycles the dependent application service). Also, when use SQLAnalyzer to run 'xp_sqlmaint' before restart, get message 'SQLMaint.exe' failed. (This is corrected after restart.) However, before restart, if run 'SQLMaint.exe' on DOS command line, it doesn't fail.

Any insight or wisdom about this problem would be appreciated.

Steve A. [SQL 7.0 SP3, W2K Adv Server SP2, ArcSDE 8.02]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top