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: Tuesday, November 11, 2014 3:44 AM
Points: 115, Visits: 241
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


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 5:22 PM
Points: 1,075, Visits: 3,345
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, November 23, 2014 3:06 PM
Points: 172, Visits: 891
Ignore this post, wrongly located.
Post #1546452
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse