x

How to know fragmentation status

Hi,

I am maintaing 100 databases.Recently there is huge unsertion is happen all these database. Now i want to know fragmentation percent on all the dbs.Based on that i will go for reorganize or rebuild the Index.

Is it possible to know fragmentation status of all dbs in a single query.

Thanks in advance.

more ▼

asked Aug 20, 2010 at 04:18 AM in Default

avatar image

user-806
181 20 23 27

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Books OnLine has some starting information here http://msdn.microsoft.com/en-us/library/ms188436.aspx and there are lots of scripts that people use from various sources. One of the best regarded is this one from Michelle Ufford (SQLFool) http://sqlfool.com/2009/06/index-defrag-script-v30/

more ▼

answered Aug 20, 2010 at 04:42 AM

avatar image

Fatherjack ♦♦
43.7k 79 97 117

(comments are locked)
10|1200 characters needed characters left

Fatherjack's answer is excellent, but let me add a couple more references:

If you like PowerShell then take a look at Exceptional PowerShell DBA Pt 3 - Collation and Fragmentation ( http://www.simple-talk.com/sql/database-administration/exceptional-powershell-dba-pt-3---collation-and-fragmentation/ ) by Laerte Jr.

And Robert Sheldon provides an excellent overview in Defragmenting Indexes in SQL Server 2005 and 2008 (http://www.simple-talk.com/sql/database-administration/defragmenting-indexes-in-sql-server-2005-and-2008/ ) which is well worth reading before you take action if you do not already have a good understanding of fragmentation.

more ▼

answered Aug 20, 2010 at 09:15 AM

avatar image

TimothyAWiseman
15.6k 22 49 38

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x273
x21

asked: Aug 20, 2010 at 04:18 AM

Seen: 1549 times

Last Updated: Aug 20, 2010 at 04:18 AM

Copyright 2016 Redgate Software. Privacy Policy