Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DEFRAG Indexes 1

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
0
0
US
Hello all --

Long time no see (which is a good thing ;-)) --

I am looking into degragmenting my databases (internally), and have found the:

DBCC INDEXDEFRAG

But am quite dismayed at the prospect of sifting through every single index of every single table of every single database and constructing a query for each... which is what it appears that this command requires me to do.

I'm sincerely hoping beyond hope that one of you fine ladies/gentlemen out there can fix me up with a more efficient way of performing this maintenance -- perhaps on a database by database basis, or better yet, an entire server.

Thanks alot! :)
paul
penny1.gif
penny1.gif
 
link9,

go to BOL and search for DBCC SHOWCONTIG. At the bottom of the page there is a script that I think will help you defrag indexes for an entire db based on maxfrag.

HTH
 
Beautiful.

Thanks, sunny456!

:)
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top