FETCH NEXT FROM c INTO @OBJECT_ID, @INDEX_NAME, @SCHEMA_NAME, @OBJECT_NAME, @AVG_FRAG END CLOSE c DEALLOCATE c

DROP TABLE #tempIM

SELECT cast(@RebuildCount as varchar(5))+' index have been Rebuild,'+cast(@ReOrganizeCount as varchar(5))+' index have been Reorganized.' as ResultEND ----------------------------------------------------------

About Me

I have been in IT sector for 10 years. As professionals know everything is not going in rules. I will share my experiences and small tips&tricks about Microsoft Server Family , Cisco Devices , HP and IBM servers and storages on this site.
Egemen TANIRER (Computer Engineer)