Execution times for Database Integrity Check Task Vs DBCC CHECKDB

  • SQL Instance details:

    SQL Server 2005 Enterprise Edition x64 with SP2.

    Windows OS Details:

    Windows 2003 Enterprise Edition x64 with SP2

    This SQL instance hosts a single 60 GB database. I have setup a maintenance plan to check the database integrity, database backup, transaction log backup.

    When i check the history of this plan i see that the database integrity check task runs for couple of seconds, less than a minute. But, when i run the DBCC CHECKDB (DBNAME) via a query window, it runs for several minutes. I believe the database integrity task in fact runs DBCC CHECKDB(). Then, why is there such a difference in the execution time?

    Any reason for this?

    Thank you

    Ravi

  • Because it runs with option like "with physical only".

    Chack the Error log with same timestamp and see the complete command ..

    Regards

    Abhay Chaudhary
    Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)

  • I have checked the T-SQL of the Check Database Integrity task and it doesn't have the "with PHYSICAL_ONLY". This is the T-SQL of the task:

    USE [PRD]

    GO

    DBCC CHECKDB WITH NO_INFOMSGS

    GO

  • DBCC CHECKDB() --> this is executing in the default database which is probable master

    That is why it is so quick. Whereas ...

    DBCC CHECKDB(yous_database_name) --> is performing the DBCC on the database you wish to check !

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Hello Rudy,

    Sorry, DBCC in both the situations is running on the user database 'PRD'.

Viewing 5 posts - 1 through 4 (of 4 total)

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