SQLTeam.com | Weblogs | Forums

Getting error when running the maintenance job


Hello All,
Getting the following error when running the SQL Server maintenance job.

SQL server : SQL 2012 Standard SP2.

Error: Alter failed for Server 'ServerName'. This error is getting for last 3 weekends for Index Rebuild or ReOrg. Before that it is running fine.

Please let me know if you guys have any recommendation.


Is the ALTER TABLE using "ONLINE = ON" perhaps? I don't think that is available for your version of SQL.

I suggest using SQL Profiler to grab the exact SQL statement that is being issued by the scheduled maintenance job and then we should be able to see what syntax is causing the message


I didn't change any settings and it was running successful for more than a year and suddenly getting failed with the error :Alter failed for Server 'ServerName'


Longshot: Session has got "stuck" and is blocking something. Is it an option to cycle the SQL Service?



The SQL Backup jobs and other maintenance jobs running with out any issue. I am planning to create a new job with same information.

Thank you so much for your suggestion.


AFAIK Backups won't BLOCK for anything at all ...

For the other maintenance jobs I suppose it depends what they are doing ...

Are you sure you have the error message exactly right?

    Error: Alter failed for Server 'ServerName'

because I think I would have expected it to say "Alter table failed for ..."

I would expect the exact error message to be recorded in the SQL Server Errors Log (to save you having to wait until next time it runs)


The error message is Alter failed for Server 'ServerName' and i am not seeing any error in SQL log.


I had a quick Google and I think it might be this: