Integrity Checks Job Failed

  • Job 'Integrity Checks Job for DB Maintenance Plan 'PRODBACKUP'' : Step 1, 'Step 1' : Began Executing 2004-11-16 14:55:08

    output                                                                                                                                                                                                                                                        

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    (null)

    Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760                                                                                                                                                                                                    

    Copyright (C) Microsoft Corporation, 1995 - 1998                                                                                                                                                                                                              

    (null)

    Logged on to SQL Server 'PRODDBAPPS'                                                                                                                                                                                                                        

     as 'APPS\Administrator' (trusted)                                                                                                                                                                                                                    

    (null)

    Starting maintenance plan 'PRODBACKUP' on 11/16/2004 2:55:09 PM                                                                                                                                                                                       

    (null)

    [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft][ODBC SQL Server Driver][SQL Server]Database state cannot be changed while other users are using the database 'PRODDB'                                                                    

    [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE statement failed.                                                                                                                                                                               

    [Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption command failed.                                                                                                                                                                                    

    (null)

    [1] Database PRODDB: Check Data and Index Linkage...                                                                                                                                                                                                        

    (null)

    [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.                                                                               

    (null)

    (null)

        The following errors were found:                                                                                                                                                                                                                          

    (null)

    [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.                                                                                                                                      

    (null)

        ** Execution Time: 0 hrs, 0 mins, 1 secs **                                                                                                                                                                                                               

    (null)

    (null)

    Deleting old text reports...                                                                                                                                                                                                                                  

        0 file(s) deleted.                                                                                                                                                                                                                                        

    (null)

    (null)

    End of maintenance plan 'PRODBACKUP' on 11/16/2004 2:55:09 PM                                                                                                                                                                                         

    (null)

    SQLMAINT.EXE Process Exit Code: 1 (Failed)                                                                                                                                                                                                                    

    (null)

    Msg 22029, Sev 16: sqlmaint.exe failed. [SQLSTATE 42000]

    This is mean that you can't do integrity check dynamically?

     

  • Have you checked "Attempt to repair any minor problems" checkbox in the integrity check tab inside maintenance plan? If yes then that answers your question, because you can't run dbcc checkdb with rebuild_repair option if database is not in single user mode. And if you have any user connected to the database at that time, it will not allow sql server agent to switch database in single user mode. So why dont you uncheck "Attempt to repair minor problems" and then try running maintenance job. If that gives any kind of consistancy error or allocation error then switch database in to single user mode and then run dbcc checkdb with other option for repair.

  • Thanks Dave!

Viewing 3 posts - 1 through 2 (of 2 total)

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