Home > Archive > Microsoft SQL Server forum > September 2005 > sqlmaint.exe failed









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author sqlmaint.exe failed
Trevor Best

2005-09-11, 8:28 pm

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.

John Bell

2005-09-12, 3:27 am

Hi Trevor

I assume you have read
http://support.microsoft.com/defaul...kb;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/defaul...kb;en-us;303292

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

HTH

John

"Trevor Best" <googlegroups@besty.org.uk> wrote in message
news:1126482331.316173.127270@z14g2000cwz.googlegroups.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.
>



Trevor Best

2005-09-12, 11:23 am

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\Micros
oft\MSSQLServer\Setu
p (not where the
first link says it is) and the path is set correctly.

John Bell

2005-09-12, 8:24 pm

Hi

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

John

"Trevor Best" <googlegroups@besty.org.uk> wrote in message
news:1126541866.564969.175060@g14g2000cwa.googlegroups.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\Micros
oft\MSSQLServer\Setu
p (not where the
> first link says it is) and the path is set correctly.
>



Greg D. Moore \(Strider\)

2005-09-13, 3:23 am


"Trevor Best" <googlegroups@besty.org.uk> wrote in message
news:1126541866.564969.175060@g14g2000cwa.googlegroups.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\Micros
oft\MSSQLServer\Setu
p (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.


>



Trevor Best

2005-09-13, 8:24 pm

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.

John Bell

2005-09-14, 3:23 am

Hi

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

John

"Trevor Best" <googlegroups@besty.org.uk> wrote in message
news:1126650430.806647.73590@g43g2000cwa.googlegroups.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.
>



Trevor Best

2005-09-15, 1:23 pm

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.

John Bell

2005-09-15, 1:23 pm

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" <googlegroups@besty.org.uk> wrote in message
news:1126805453.468393.303380@g49g2000cwa.googlegroups.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.
>



Trevor Best

2005-09-22, 3:23 am

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.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com