0 pts.
 Defrag SQL Database
To my understanding, a normal defrag application will not defrag a SQL database. How would this be done, how would you defrag a SQL database? What applications could you use and/or what commands would you use? Kind Thanks.

Software/Hardware used:
ASKED: September 19, 2004  6:06 AM
UPDATED: May 2, 2012  5:01 PM

Answer Wiki:
Diskeeper would be a way to degrag the physical database files and then use DBCC REINDEX to rebuild the indexes. A search on Google for defrag SQL shows a couple of articles about this ================ If you are comparing it to the defragment tools such as the utility software used to defrag the hard disk drive, it somewhat different to an SQL database. Remember that it is a database it is really risky to perform defragmentation to the SQL database. However, I believe that there is no software that defrags an SQL database or any database. ____________________________________________________ _____________________________________________________ diskeeper is not going to defrag anything in the database. That is at the filesystem only. in order to defrag your indexes you will need to implement a maintenance plan to do so. You can use the builtin plans or you can use a script that is smarter then the maintanance plan wizard in order to do so. This is a great one that is smart and is free. The developer has done a great job on this but be sure to test it first. <a href="http://sqlfool.com/2011/06/index-defrag-script-v4-1/">http://sqlfool.com/2011/06/index-defrag-script-v4-1/</a>
Last Wiki Answer Submitted:  May 2, 2012  5:01 pm  by  Emps   2,055 pts.
All Answer Wiki Contributors:  Emps   2,055 pts. , BasisDBA35   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Yes, for external fragmentation u can use Disk keeper…
n for internal fragmentation u can use DBCC REINDEX..
but Theres another option for internal fragmentation…
DBCC INDEXDEFRAG, its an online operation. It does not hold locks long term and thus will not block running queries or updates.

 0 pts.