SQL Server Performance

Database Files are 85% fragmented

Discussion in 'General DBA Questions' started by SanetteWessels, Oct 22, 2003.

  1. SanetteWessels New Member

    Hi everyone,

    I was told to the best way to correct this is to dump and restore the database. Is this correct or is there anything else that I can try?

    Thanks in advance.

    Sanette



    SQL Developer
    JustEnough Software Corporation
    Walking on water and coding of a spec is easy, as long as both are frozen - A friend
  2. satya Moderator

    In general to reduce the index fragmentation is to reindex and for the files means you need to run DBCC CHECKDB & CHECKCATALOG to make sure there is no inconsistency.

    Make sure regular dbcc checks and maint.plans are in place to reduce the performance overhead.

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com
  3. thomas New Member

    I think Sanette is talking about Operating System file fragmentation. In order to remove this, you need to stop SQL Server and run disk defragmenter. There is one that comes with Windows 2000 and above.

    Tom Pullen
    DBA, Oxfam GB
  4. FrankKalis Moderator

  5. SanetteWessels New Member

    Thanks Satya, so just to confirm if I run DBCC CHECKDB it will fix the defragmentation of the files?

    Has it got an overhead on the server or can I run it at any time?

    Sanette

    SQL Developer
    JustEnough Software Corporation
    Walking on water and coding of a spec is easy, as long as both are frozen - A friend
  6. satya Moderator

    If your query is related to the files follow as suggested by Thomas.

    And to defragment those files you must stop the SQL server in order to work out the DISK DEFRAGMENTOR.

    Its not recommended to use this OS utility on database drive.
    BTW what is the current issue with defragment of files?

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com
  7. ykchakri New Member

    And when it comes to overhead, both OS de-fragmentation and database de-fragmentation are resource intesive and hence are recommended to run when there is less activity on the server.
  8. satya Moderator

Share This Page