Grooming options

  • I would like to run integrity check and repair job on a database which has a 24x7 open connection from an app. So DB cannot be put in a single user mode. What other options can I look at to accomplish the task at hand?

     

    any idea?

  • Are you using DBCC CHECKDB?  It doesn't require the database to be in single user mode because it used schema locks on tables rather than shared locks.

    Greg

    Greg

  • I was using a maintenance plan to accomplish those tasks. DBCC CHECKDB doesnot release any free space. or does it?

  • Maintenance plans execute DBCC commands including DBCC CHECKDB to check database integrity and DBCC SHRINKDATABASE to shrink the database files and free up space.  As far as I know, they are all online operations that don't require single user access.  See "Maintenance statements - DBCC" in BooksOnLine.

    Did you get an error when the maintenace plan ran?

    Greg

    Greg

  • If you check the "Attempt to repair any minor problems" option, sql server will try to change the db to single user mode to run the repairs...

    It is not advisable to check this option... some times after repair sql can't able to bring the db to multi user mode...

    http://www.sql-server-performance.com/ak_inside_sql_server_maintenance_plans.asp

     

    MohammedU
    Microsoft SQL Server MVP

  • If you're using SQL 2000, I believe DBCC CHECKDB will create long-running transactions (which will cause blocking).  However, if you're running SQL 2005, DBCC CHECKDB will actually create a database snapshot (in the background) which does not generate any locks in the source database while it's running.


    Regards,

    Todd Clark

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

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