Maintenance Job Failed

  • Hi,

    My server is running under local system account. I created one maintenance job for db backup. when i execute it is failed.

    Error Message on the job history :Executed as user: NT AUTHORITY\SYSTEM. sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.

    Please help.

    Regards,

    S.Balavenkatesh

    Balavenkatesh.Sambath@wipro.com

  • Hello,

    Please see the following MS Article on how to troubleshoot Maintenance Plans:

    http://support.microsoft.com/kb/288577

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • I verified the history information of the job. No information is stored. How can we check.

    Is ther any other reason?

    regards,

    S.Balavenkatehs

  • Hello again,

    Did you follow the steps in the article for producing more detailed error information e.g. logging to a file?

    Without any more information it will be hard to resolve this issue. My guess would be it is permissions related e.g. missing permissions on the folder where you want to write the backup to? (I assume it is to a local folder on the Server?)

    BTW – It is recommended to run SQL Agent under a Domain Account rather than the Local System Account.

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • I manually taken the backup of all the db's and put the backup files on the local folder.

    But when i configured the same folder through maint job it is failed.

    Regards,

    S. Balavenkatesh

  • now i recycled the error log and then run the maint job,. Again it is failed. But there is no information in the server error log.

    Regards.

    Balavenkatesh

  • Hello again,

    I still guess at a permissions issue. If you run SQL Agent under your Domain Account, does the Maintenance Job fail?

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • Hi,

    When i create a job (put the scripts manually) without DB maint wizard, it is working fine.

    The problem is when i create a job through maint. plan it is failed.

    Regards,

    S.Balavenkatesh

  • By any chance did you removed builtin adminitrator accout on this server? Are you checking database integrity also?

    MJ

  • I verified the integrity of the all the dbs. Everything is fine. I checked the builtin account. It never deleted.

    Last week we add more space on that drive. From that onwards maintenanct plan failed. But we can take the backup manually and run the jobs through scripts.

    Only problem is through maintenance job we can't take backup.

    Regards,

    S.Balavenkatesh

  • Why don't you post all the steps you followed to create the maintenance plan here so we can see if you are maybe doing something wrong.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • It does sound permission related. Check the properties of the backup directory on your server and make sure the SYSTEM account has at least write permissions.

    Also make sure you're logging on jobs (right-clcik the SQL Agent in Management Studio and select properties and select the History page and configure the values). Once we have a log of the job then it will make it easier to troubleshoot.

  • I don't think it’s a permissions issue. I have fought with this many times. It may be a minor bug with your 2005 Server Management Studio Application.

    I noticed that in SP 1 of SQL 2005 Server Management Studio, there is a small bug. I don't know if it’s just me or if everyone has this issue, but when you create a Maintenance Task using the wizard it will create a associated job to schedule it. If you EDIT the STEPS for the job under properties, you will notice that the Package Execution plan created starts without a " \ ". That will always cause the job to fail. Either add a " \ " to the Execution Package line or re-link it by choosing the [...] button and finding it in the SSIS store. Save it and run it manually. Hopefully it will no longer fail for you.

  • Look at the folder permissions of the target folder.

    Do they match 1) the SQL Agent account? Make sure they do.

    Also, are you running the job manually in the jobs tab under SQL Agent or letting it run as scheduled. Sometimes when you run it manually it uses the account you have registered the SQL Server to the Enterprise Manager instead of the SQL Agent account. I think there is a Run As (self) or other values in a drop down on the job, check the job properties to see.

    If the file permissions match the SQL Agent service and the folder permissions allow the same account the SQL Agent uses, let it run on a scheduled basis if you have not previously and see if it runs normally.

    You can also just copy out the SQLmaint.exe T-SQL from the job and paste it into a SQL Query Analyzer window that is using the same login as whatever you connected to the SQL Server with (registered the SQL Server to Enterprise Manager -- do this by starting the SQL Query Analyzer from the Enterprise Manager after highlighting any database on the targeted server - this will start the SQL Query Analyzer with the same credentials you registered the SQL Server to Enterprise Manager - the credentials will appear in the top window bar of the SQL Query Analyzer). Pasting and running it from the SQL Query Analyzer will get error messages to show up generally back into the SQA, maybe on the messages tab in the results window if you have output to grid instead of text. Work from there based on the new information.

    Scott Lord

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply