Job failure - Just says the step failed

  • I have a job that has been running at my job from before when I started working here 6 months ago. We have never had a problem with it. Last week it started failing. We also noticed last week that the database it was running against has a whole bunch of extra tables in it. We do not know how or why they were created. We are trying to find out who could have done it but we haven't yet identified the culprit.

    In the meantime, the job still isn't running and I can't figure out why. The job is failing on the first step. That first step runs a vbs script from a command prompt. I logged into the server and ran the vbs script successfully. I then logged out and logged in as the sql_service user that the script is being run with (per the job) and I was able to run the script. So, the vbs script runs outside of SQL Server but not from the job.

    I created another job and just put this one step in and I get the same error.

    The only place I see where I can get the error from the job is in the job history and the error is very basic. How can I get more detailed logs of the error?

    I have played around with the job a little. Originally I was getting the following error:

    Executed as user: <Domain>\sql_service. The step did not generate any output. Process Exit Code 1. The step failed.

    I played around with the database. I am not sure what change caused the error change. But I did change the owner of the database from: NT\<something I forget> to sa. Now I get:

    Executed as user: <Domain>\sql_service. The step failed.

    Any ideas?

    Thank you.

    Tammy

  • You need to be sure more detailed logging is capture from the job. In the job steps, you can capture output to a table.

    If this is VBS, you could also pipe the output to a file.

  • As Steve suggested, you need to enable further logging.

    I had an issue with a SQL job the other week and I wasn't getting enough information so I followed the advice on here and was able to resolve the issue. Go to advanced page on the step to setup the logging as below:

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Thank you. I tried that and there was no output. The file created, but nothing was written to it,

  • Any other ideas? I have noticed that it looks like the problem with the jobs is only when it is running a cmd step, i.e. running a step against the operating system.

  • Can someone tell me how to mark a post as the answer? I don't know how to do it.

    The answers above are good. They aren't what I ended up doing, but they are good.

    I changed the steps that used the Operating System to use xp_cmdshell (which I know is a security risk). But the cscript command would not work with using the Operating System option. It would only work with xp_cmdshell.

    I would like to award points (I assume this site does that) to the correct answer.

    Thank you.

    Tammy

  • Tammy, we don't mark answers as correct. Arguably, you or a person asking a question, doesn't know what is the best way to do things. You can let us know what you did, and what worked, but those aren't always answers.

    Glad it's working for you and we were able to give you some ideas.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply