Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Job failure - Just says the step failed Expand / Collapse
Author
Message
Posted Monday, November 12, 2012 9:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 26, 2013 9:58 AM
Points: 19, Visits: 71
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
Post #1383755
Posted Monday, November 12, 2012 10:43 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:10 PM
Points: 33,095, Visits: 15,202
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.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1383776
Posted Monday, November 12, 2012 10:50 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 26, 2014 4:08 AM
Points: 708, Visits: 3,286
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

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
Post #1383782
Posted Monday, November 12, 2012 11:12 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 26, 2013 9:58 AM
Points: 19, Visits: 71
Thank you. I tried that and there was no output. The file created, but nothing was written to it,
Post #1383791
Posted Monday, November 12, 2012 11:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 26, 2013 9:58 AM
Points: 19, Visits: 71
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.
Post #1383798
Posted Tuesday, November 13, 2012 12:19 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 26, 2013 9:58 AM
Points: 19, Visits: 71
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
Post #1384241
Posted Tuesday, November 13, 2012 1:04 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:10 PM
Points: 33,095, Visits: 15,202
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.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1384262
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse