SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Job failure - Just says the step failed


Job failure - Just says the step failed

Author
Message
tammyf
tammyf
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 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
Steve Jones
Steve Jones
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: Administrators
Points: 61933 Visits: 19099
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
My Blog: www.voiceofthedba.com
Abu Dina
Abu Dina
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1225 Visits: 3323
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
tammyf
tammyf
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 Visits: 71
Thank you. I tried that and there was no output. The file created, but nothing was written to it,
tammyf
tammyf
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 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.
tammyf
tammyf
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 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
Steve Jones
Steve Jones
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: Administrators
Points: 61933 Visits: 19099
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
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search