469,081 Members | 1,808 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

sqlmaint.exe failed

I have a maintenance plan on a client's site, there's only one database
in the plan and it's set to backup db and log, this job fails
consistently. The one step in the job contains this line:

EXECUTE master.dbo.xp_sqlmaint N'-PlanID
392B2334-6800-4655-A6C7-5414D9072505 -WriteHistory -VrfyBackup
-BkUpMedia DISK -BkUpDB "C:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\DailyBackups" -DelBkUps 4WEEKS -BkExt "BAK"'

Which fails if run in QA with the message:

Server: Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.

I've searched for this error and cannot find anything to help.
There's no "-S" in the path, it writes absolutely no history on the
plan. I set the plan to write history in the log directory on the
server, it wrote nothing to that directory.

The database doesn't get backed up but is able to be backed up manually
to the path specified in the plan. I also have a separate job with a
SQL backup statement in it that works OK so SQLAgent is working.

Sep 11 '05 #1
9 18434
Hi Trevor

I assume you have read
http://support.microsoft.com/default...b;en-us;326485

You may want to look at writing the history to a text file and the option to
do more verbose logging from SQL agent in:
http://support.microsoft.com/kb/288577/

Also check out which database you are applying the plan to:
http://support.microsoft.com/default...b;en-us;303292

You may want to consider writing your own set of maintenance routines that
give you more information.

HTH

John

"Trevor Best" <go**********@besty.org.uk> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a maintenance plan on a client's site, there's only one database
in the plan and it's set to backup db and log, this job fails
consistently. The one step in the job contains this line:

EXECUTE master.dbo.xp_sqlmaint N'-PlanID
392B2334-6800-4655-A6C7-5414D9072505 -WriteHistory -VrfyBackup
-BkUpMedia DISK -BkUpDB "C:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\DailyBackups" -DelBkUps 4WEEKS -BkExt "BAK"'

Which fails if run in QA with the message:

Server: Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.

I've searched for this error and cannot find anything to help.
There's no "-S" in the path, it writes absolutely no history on the
plan. I set the plan to write history in the log directory on the
server, it wrote nothing to that directory.

The database doesn't get backed up but is able to be backed up manually
to the path specified in the plan. I also have a separate job with a
SQL backup statement in it that works OK so SQLAgent is working.

Sep 12 '05 #2
Thanks, I've read the links you provided but none have helped.

I can actually run the plan from an NT command prompt window and the
backup runs OK and the plan exits with code 0 (success).

It's just running from the SQLAgent or from Query analyser it fails
immediately without having done anything. It's as though it just can't
execute sqlmaint.exe. I can run other xps such as xp_msver without
trouble so I'm sure the paths are correct.

I checked HKLM\SOFTWARE\Microsoft\MSSQLServer\Setup (not where the
first link says it is) and the path is set correctly.

Sep 12 '05 #3
Hi

That would imply permissions is an issue, have you changed the service
account or directory permissions/locations?

John

"Trevor Best" <go**********@besty.org.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Thanks, I've read the links you provided but none have helped.

I can actually run the plan from an NT command prompt window and the
backup runs OK and the plan exits with code 0 (success).

It's just running from the SQLAgent or from Query analyser it fails
immediately without having done anything. It's as though it just can't
execute sqlmaint.exe. I can run other xps such as xp_msver without
trouble so I'm sure the paths are correct.

I checked HKLM\SOFTWARE\Microsoft\MSSQLServer\Setup (not where the
first link says it is) and the path is set correctly.

Sep 12 '05 #4

"Trevor Best" <go**********@besty.org.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Thanks, I've read the links you provided but none have helped.

I can actually run the plan from an NT command prompt window and the
backup runs OK and the plan exits with code 0 (success).

It's just running from the SQLAgent or from Query analyser it fails
immediately without having done anything. It's as though it just can't
execute sqlmaint.exe. I can run other xps such as xp_msver without
trouble so I'm sure the paths are correct.

I checked HKLM\SOFTWARE\Microsoft\MSSQLServer\Setup (not where the
first link says it is) and the path is set correctly.
Almot definitely then SQLAgent is NOT running under a domain account that
has access to the path you're specifying.


Sep 13 '05 #5
The services are running under the local system account and that has
full access to the path specified.

SQLAgent can back up to the path using just a "backup database" command.

Sep 13 '05 #6
Hi

You could prove this by temporarily changing the account or to a lesser
degree by changing the directory.

John

"Trevor Best" <go**********@besty.org.uk> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
The services are running under the local system account and that has
full access to the path specified.

SQLAgent can back up to the path using just a "backup database" command.

Sep 14 '05 #7
I tried backing up to a different directory (c:\backup) where another
SQLAgent job successfully backs up using just a "backup database"
command, the backup database command works in this directory but the
maintenance plan doesn't.

I will see if I can get their IT guy to make SQLServer and SQLAgent to
run as Administrator user and see if that helps.

Sep 15 '05 #8
Hi Trevor

That would rule out permissions for the account.

Do you know what type of backup the maintenance plan is doing?

Have you tried dropping the plan and creating a new one?

John

"Trevor Best" <go**********@besty.org.uk> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I tried backing up to a different directory (c:\backup) where another
SQLAgent job successfully backs up using just a "backup database"
command, the backup database command works in this directory but the
maintenance plan doesn't.

I will see if I can get their IT guy to make SQLServer and SQLAgent to
run as Administrator user and see if that helps.

Sep 15 '05 #9
John Bell wrote:
Hi Trevor

That would rule out permissions for the account.

Do you know what type of backup the maintenance plan is doing?

Have you tried dropping the plan and creating a new one?


Yes, that didn't help.

I got the client to reboot their server in the end, this seemed to have
cured the problem.

Thanks for the advice.
Sep 22 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Jeff Reed | last post: by
9 posts views Thread by Bijoy Naick | last post: by
2 posts views Thread by Dennis | last post: by
1 post views Thread by kencana | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.