Join | Login | Why Join?   
SQL Server, Oracle, DB2, Sybase, MySQL Help - SSWUG.ORG HACKER SAFE certified sites prevent over 99.9% of hacker crime.
Search SSWUG:   
 
Access to 467 free guest articles, discussions and more, just create your free SSWUG User ID:
Email address:  
This will be your login ID - we'll email you your password - you'll even receive the newsletter, opt-out at any time.
Email to Friend //  Discuss Article //  Rate Article //  Digg Article //  Add to Del.icio.us //  Add to Technorati

Full site membership is required for this article. Already a full member? Login here.
You currently have a guest membership. You can upgrade to full site membership here (free trial available).

Rebuild or Reorganize or do nothing to indexes SP


 Article Abstract:

The following stored procedure makes use of the index fragmentation information that resides in the dynamic management view sys.dm_db_index_physical_stats.it decides according to the pecentage of fregmenation if an index is to be rebuild, reorganized or left as is.

 Read this article...

 Related Articles - For Members.
All Articles By Author

Tips for using views in SQL Server 2005
Database Design Changes and Change Management
SQL Server Views Optimization Tips
Using Full-text Search
Find out the last updated date of SP, UDF, Views, Triggers in SQL Server 2005
Find all tables and schemas without a primary key constraint
How to find out recently run queries in SQL Server 2005?
Setup full-text search: step by step guide
Procedure for ONLINE rebuild of all indexes in SQL 2005
Indexes - Determining Unused Indexes



Key (Please note):
(R) - registration may be required for access at the target site
($) - target site may require paid membership for access to this or other content


Reader Comments: Post Your Comments/Feedback

RE: Rebuild or Reorganize or do nothing to indexes SP
by Eric Hambleton (posted: 10/13/2008 7:36:34 AM)
Appears to work only with dbs created under SQL Server 2005. Doesn't seem work with older dbs mounted and running in compatibility mode as the necessary function sys.dm_db_index_physical_stats doesn't exist.



Email to Friend //  Discuss Article //  Rate Article //  Digg Article //  Add to Del.icio.us //  Add to Technorati

   




 

[ Register ] [ Webcasts ] [ Podcasts ] [ Newsletter Archive ] [ RSS/Feeds ]
[ About ] [ Advertise ] [ Contact ] [ Privacy ] [ Terms of Service ]
[ Link to SSWUG ] [ List Server Archives ] [ Recent Orig. Content ]
(c) 1997-2008, Bits on the Wire, Inc.  (0)

Some names and products covered by SSWUG are the registered trademarks of their respective owners.
DAA10354WWW004