26 March 2012

Errore su CHECKDB piano manutenzione SQL 2008

Creando un piano di manutenzione (anche con il wizard), il task di DBCC CHECKDB va in errore. Guardando nel log testuale, c'è il seguente messaggio:
[cut]
Operazione non riuscita:(0) Impossibile eseguire Modifica per Server 'SQLSRV2012\\SQL2005'. 
guardando nei log di SQL, c'è invece questo strano messaggio:
Configuration option 'user options' changed from 0 to 0. Run the RECONFIGURE statement to install.
si risolve lanciando questa query:
sp_configure 'Allow Updates', 0



Un po' di documentazione:

http://sqlblog.com/blogs/eric_johnson/archive/2009/12/23/troubleshooting-a-failed-maintenance-plan.aspx

Basically, I ran a profiler trace looking for the User Error Message and Exception events. From the trace, I found this exception:
Error: 5808, Severity: 16, State: 1 
Ad hoc update to system catalogs is not supported.
I then ran sp_configure 'Allow Updates', 0, and ran the package again. Now it succeeded.




Testato su SQL 2008R2 (ma pare fosse un problema anche su 2005).
Trovato qui.