Link to home
Create AccountLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Conditional maintenance plan

I need to create a maintenance plan that checks for index fragmentation and if it is 30% or less then reorganizes the index, and if it is above 30% - rebuilds it. Is this kind of conitional maintenance possible? How can I do that?
Avatar of Aneesh
Aneesh
Flag of Canada image

Never tried it, there are reorganize and reindex tasks i beleive;
I personnaly wont use maintenance plan, would create my own script to handle this;

http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
Avatar of YZlat

ASKER

Thanks but I have already seen this one.

Also as for my own script, I wish i could, I can only use the Maintenance Plan Wizard here
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer