473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SQL Agent Job Fails Immediately after Invoked

Hey everyone --

I've been having this problem for a couple weeks and was hoping maybe
someone can help out a little bit.

Synopsis:

This SQL agent job contains code to perform a full database backup with
verification and is writing to a local disk array. I typically also use
some code for reporting - declaring variables and inserting them into
a linked server database that I use to monitor all my database backups.
I have tested and used the code repeatedly and am confident it works.

I have ran the code through Query Analyzer and it completes with
success.

I have removed reporting code & used only the backup statement & it
fails.

I have 4 other Agent jobs doing other various tasks that function as
expected.

I have tried deleting & recreating the job & it still fails.

When I enable logging the application log has only one entry for SQL
Agent:

Event Type: Warning
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 208
Date: 1/4/2005
Time: 9:36:00 AM
User: N/A
Computer: ComputerName
Description:
SQL Server Scheduled Job 'DBName Full DB Backup'
(0xA4B14FB5A5DE964B8340423E4AC4B67B) - Status: Failed - Invoked on:
2005-01-04 09:36:00 - Message: The job failed. The Job was invoked by
User domain\UserName. The last step to run was step 1 (Step 1).

Any help or ideas would be greatly appreciated. I'm racking my brain
here and for some reason just not able to think of what the problem is.
Chadd
ne******@gmail.com

Jul 23 '05 #1
9 53326

<Ne******@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hey everyone --

I've been having this problem for a couple weeks and was hoping maybe
someone can help out a little bit.

Synopsis:

This SQL agent job contains code to perform a full database backup with
verification and is writing to a local disk array. I typically also use
some code for reporting - declaring variables and inserting them into
a linked server database that I use to monitor all my database backups.
I have tested and used the code repeatedly and am confident it works.

I have ran the code through Query Analyzer and it completes with
success.

I have removed reporting code & used only the backup statement & it
fails.

I have 4 other Agent jobs doing other various tasks that function as
expected.

I have tried deleting & recreating the job & it still fails.

When I enable logging the application log has only one entry for SQL
Agent:

Event Type: Warning
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 208
Date: 1/4/2005
Time: 9:36:00 AM
User: N/A
Computer: ComputerName
Description:
SQL Server Scheduled Job 'DBName Full DB Backup'
(0xA4B14FB5A5DE964B8340423E4AC4B67B) - Status: Failed - Invoked on:
2005-01-04 09:36:00 - Message: The job failed. The Job was invoked by
User domain\UserName. The last step to run was step 1 (Step 1).

Any help or ideas would be greatly appreciated. I'm racking my brain
here and for some reason just not able to think of what the problem is.
Chadd
ne******@gmail.com


What does the Job History show for Step 1 (you need to click "Show step
details" in the history screen in EM)? Something that works in QA buts fails
when scheduled is often down to a permissions problem, but that's just a
guess - hopefully the step details will give more information.

Simon
Jul 23 '05 #2
Simon --

Thanks for the response!

Inside job history I have something that would appear equally as
useless of an error message for step 1. I should also mention that I
have everything encapsulated into 1 step, and I've tried running the
job with the owner as "sa" as well as myself (a domain admin). There is
an entry indentical to the one below for each failure:

Result: Failed RunDuration: 00:00:00
The job failed. The Job was invoked by Schedule 18 (Default Schedule).
The last step to run was step 1 (Step 1).

Jul 23 '05 #3
neurocon (Ne******@gmail.com) writes:
Inside job history I have something that would appear equally as
useless of an error message for step 1.


Maybe it's useless to you, but that't actually a poor excuse not to post
it. At least not if you want help with the issue.

So please check Show Step Details, and post the error message for step 1.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #4
Hopefully you are aware that using QA will use the permissions (and
files & config) you have and running the same job as a scheduled task
uses the permissions (and files and config) on the server it is being
run from. If not, can you test this using QA on the server, or at the
least double check for any differences between your setup and the one
of the server. My guess would be that there is some small difference
between you using this on your PC and you using this on the server.
Worth a look at least. For example, if the drive you are copying the
files to is not accessible by the admin user logged on the server.
Running through QA should give you more information.

Ryan

Ne******@gmail.com wrote:
Hey everyone --

I've been having this problem for a couple weeks and was hoping maybe
someone can help out a little bit.

Synopsis:

This SQL agent job contains code to perform a full database backup with verification and is writing to a local disk array. I typically also use some code for reporting - declaring variables and inserting them into
a linked server database that I use to monitor all my database backups.

I have tested and used the code repeatedly and am confident it works.

I have ran the code through Query Analyzer and it completes with
success.

I have removed reporting code & used only the backup statement & it
fails.

I have 4 other Agent jobs doing other various tasks that function as
expected.

I have tried deleting & recreating the job & it still fails.

When I enable logging the application log has only one entry for SQL
Agent:

Event Type: Warning
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 208
Date: 1/4/2005
Time: 9:36:00 AM
User: N/A
Computer: ComputerName
Description:
SQL Server Scheduled Job 'DBName Full DB Backup'
(0xA4B14FB5A5DE964B8340423E4AC4B67B) - Status: Failed - Invoked on:
2005-01-04 09:36:00 - Message: The job failed. The Job was invoked by User domain\UserName. The last step to run was step 1 (Step 1).

Any help or ideas would be greatly appreciated. I'm racking my brain
here and for some reason just not able to think of what the problem is. Chadd
ne******@gmail.com


Jul 23 '05 #5
Erland,

I had posted the information from the "job history" it was directly
below my post and looks like this:

Result: Failed RunDuration: 00:00:00
The job failed. The Job was invoked by Schedule 18 (Default Schedule).
The last step to run was step 1 (Step 1).

This is the only information under job history, which is why I made the
reference to its lack of usefullness. If the above makes sense to you
I'm all ears, but this and the previous posting of the entry in the
system's application log are the only two messages from logging I have.
If I'm missing something let me know, but to my knowledge the agent
only logs to these two places and not inside the sql server logs. I
checked to make sure and there was nothing there either. The above
error message repeats identically each time the job is run.
Thanks for taking the time to respond.

Chadd

Jul 23 '05 #6
Ryan --

Thanks for taking the time to respond. I suppose I should've specified
that I ran the code thru QA on the actual database server I'm having
the problem with. It runs great without error.

As an asside I've also toyed with the "owner" setting inside the job
properties and set it to me (domain administrator) as well as QA & the
account marked as this db's owner. All fail with same behavior.
Thanks again for the thoughts. Look forward to hearing more.

Chadd

Jul 23 '05 #7
neurocon (Ne******@gmail.com) writes:
I had posted the information from the "job history" it was directly
below my post and looks like this:

Result: Failed RunDuration: 00:00:00
The job failed. The Job was invoked by Schedule 18 (Default Schedule).
The last step to run was step 1 (Step 1).

This is the only information under job history,


No it isn't. Check the checkbox "Show step details" which is in the
uppoer right corner of View Job History. There is usually more meat there.

(And you have been told about this checkbox a couple of times now.)
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #8
You area totally right. I must have been in a rush while reading
earlier and skimmed over that information. Sorry about the confusion on
my part and ultimately for wasting your time =) As you can see
working within the SQL Agent stuff certainly isn't my forte'. The
information enclosed in the other agent log gave me enough information
to resolve the problem. It did end up being a permissions issue. The
owner has been changed from myself, a Domain Admin, to my designated
domain SQL account as well as SA and the SQL account that's designated
owner of the database this job runs against but still fails. The "real"
logs you requested are below -- but I'm not sure if the "owner" of the
job is actually what I'm supposed to change as far as the job "running
under/as" this account -- that's just where I thought I'd start.

The job failed. The Job was invoked by Schedule 18 (Default Schedule).
The last step to run was step 1 (Step 1).

Executed as user: NT AUTHORITY\SYSTEM. Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'. [SQLSTATE 28000] (Error 18456). The step
failed.

Again, thanks for your patience in my moment of ignorance. Any
information on adjusting the account for the SQL Agent job to run under
would be appreciated. I have other jobs running fine against the
database and the owner is set to the user who is marked as DBOwner in
the security area. I'm assuming I'm just not adjusting the right thing.
Thanks, in advance, for your further help.

Chadd

Jul 23 '05 #9
neurocon (Ne******@gmail.com) writes:
You area totally right. I must have been in a rush while reading
earlier and skimmed over that information. Sorry about the confusion on
my part and ultimately for wasting your time =) As you can see
working within the SQL Agent stuff certainly isn't my forte'. The
information enclosed in the other agent log gave me enough information
to resolve the problem. It did end up being a permissions issue. The
owner has been changed from myself, a Domain Admin, to my designated
domain SQL account as well as SA and the SQL account that's designated
owner of the database this job runs against but still fails. The "real"
logs you requested are below -- but I'm not sure if the "owner" of the
job is actually what I'm supposed to change as far as the job "running
under/as" this account -- that's just where I thought I'd start.

The job failed. The Job was invoked by Schedule 18 (Default Schedule).
The last step to run was step 1 (Step 1).

Executed as user: NT AUTHORITY\SYSTEM. Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'. [SQLSTATE 28000] (Error 18456). The step
failed.

Again, thanks for your patience in my moment of ignorance. Any
information on adjusting the account for the SQL Agent job to run under
would be appreciated. I have other jobs running fine against the
database and the owner is set to the user who is marked as DBOwner in
the security area. I'm assuming I'm just not adjusting the right thing.
Thanks, in advance, for your further help.


I can't really work out if you still have a problem, or your backup
is now running as it should.

Neither can I count SQL Agent as my forté, but changing the owner
sounds like a good thing.

Notice that this is not an issue with access to the database in
question. It is the access to SQL Server as a whole that is denied.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matt | last post by:
Hello I am running a SP from the SQL Server Agent, the job has one step that looks like this. exec q_spr_inlevextsystem This job fails with the following message Job 'AutoInlev' : Step...
3
by: Dave | last post by:
I have been reading everything i can find regarding sql mail and sql agent mail. We have a win2k server, sql 2000 and NO, NO, NO exchange server(all up to date on service packs). I have tried...
12
by: Gary | last post by:
Hi! guys, I have a SQL agent job fails because it gets 10 warnings when it runs a stored procedure. These warnings are trivial and can be ignored. Can I make it ignore these warnings and...
29
by: Ken Allen | last post by:
I have a number of services developed in C# (.Net), and they have been working fine for the most part. Recently someone reported that ipon occassion (originally rarely, but more frequently on some...
0
by: RAJ | last post by:
This event appears to be invoked twice for absolutely no reason on only one of my ASP.Net web user controls. Although I've now overcome the problem by overriding the base classes OnLoad routine, I...
1
by: EdPoint | last post by:
My attempt to follow the steps outlined in "Getting started with My.Blogs" http://msdn.microsoft.com/vbasic/default.aspx?pull=/library/en-us/dnvs05/html/MyBlogsGetStart.asp], fails immediately. ...
3
by: db2udbgirl | last post by:
Env : DB2 UDB 8.2, AIX 5.3, Ascential Datastage (DS) DS jobs are used to process the backend DB2 database. Sometimes DS job fails with the message APT_CombinedOperatorController,0: Fatal Error:...
0
by: EoRaptor013 | last post by:
I'm using our dev ID to set up peer-to-peer replication among three SQL Server 2005 servers. The dev ID essentially has sa rights to the server and databases. Per the BOL, I explicitly gave the...
1
by: Edwin.Madari | last post by:
jlist wrote: switching to urllib2, installing the proxy opener, worked for me. here is the sample. variable names are self explanatory import urllib2...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.