using dbcc commands

  • hi all

    can we run dbcc commands on db which is 1 TB of Size.

    i.e like check db,indexdefrag,opentran,showcontig......

    Regards

    Sudhir

  • You can. Some you must, so you run only for specific reasons, some you can find other options.

    DBCC showcontig is deprecated, use sys.dm_db_index_physical_stats

    DBCC indexdefrag is deprecated, use ALTER INDEX ... REORGANISE

    DBCC DBReindex is deprecated, use ALTER INDEX ... REBUILD

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Beware of the resources usages and potential slowdowns of some of these as well.

    You ought to also be running dbcc checkdb, either on the main db or on a restored backup

  • check out Paul Randall's post here regarding checkdb on vldb's.

    Partitioning helps but i'd recommend running these commands during a quiet period or out of hours if possible.

    _________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie

  • Thanks......

  • Keep an eye on TempDB too when you run this intense command on a big database.

  • Better to use dbcc command on table wise rather than executing it on whole databases.It may lead space crunch if you dont hv enough in your machine.

  • bipan (8/2/2011)


    Better to use dbcc command on table wise rather than executing it on whole databases.It may lead space crunch if you dont hv enough in your machine.

    And which of the few hundred DBCC statements are you particularly referring to here?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 8 posts - 1 through 7 (of 7 total)

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