Tuesday, August 8, 2006

SQL Server job errors after changing a Database Maintenance Plan

Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL Server Driver][SQL Server]DBCC failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER, ARITHABORT'.

The work around for this is to update the schedule job manually as follows:

1. Open the failed job under Management\Jobs using SQL Enterprise Manager.
2. Select the STEPS tab, then click EDIT (STEP 1 should already be selected).
3. Append the text ‘-SupportComputedColumn’ to the Job String as below:

Original String : “EXECUTE master.dbo.xp_sqlmaint N'-PlanID 973B3AE1-879C-479D-BE27-71076BBC8A54 -To "Helpdesk" -Rpt "C:\Program Files\Microsoft SQL Server\MSSQL\LOG\Harmony System0.txt" -DelTxtRpt 4WEEKS -WriteHistory -RebldIdx 10 '”

Update String : “EXECUTE master.dbo.xp_sqlmaint N'-PlanID 973B3AE1-879C-479D-BE27-71076BBC8A54 -To "Helpdesk" -Rpt "C:\Program Files\Microsoft SQL Server\MSSQL\LOG\Harmony System0.txt" -DelTxtRpt 4WEEKS -WriteHistory -RebldIdx 10 -SupportComputedColumn'”

4. Select APPLY, then save the job selecting APPLY or OK at the appropriate times.