Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Request for the script of indexes Expand / Collapse
Author
Message
Posted Monday, December 16, 2013 3:09 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 12:46 PM
Points: 115, Visits: 236
Friends,
Could any one help me to get the script which is suitable to below scenario.

1) It should identify the fragmentation.
2) If any of the index is less than 30% it has to script out all the indexes which should be like below
Alter index [index_name] on [Table_name] reorganize
3) If any of the index is greater than 30% it has to script out the indexes which should be like below.
Alter index [Index_Name] on [Table_Name] rebuild with online=off


Thanks,
I’m nobody but still I’m somebody to someone………….
Post #1523450
Posted Monday, December 16, 2013 3:13 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 11:51 AM
Points: 969, Visits: 3,026
Do a search for Ola Hallengren. He has everything you need.


Michael L John
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
Post #1523451
Posted Friday, February 28, 2014 10:01 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, September 28, 2014 6:09 AM
Points: 166, Visits: 861
Ignore this post, wrongly located.
Post #1546452
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse