>Look at sp_HelpIndex - you can insert the results of this call into a temporary table, drop each index in the temp table and then rebuild.
>
>The only thing this doesn't give you is what to build the index on - probably in one of the sys tables.
>
>Another option would be to script the indexes and execute the sql file somehow.
>
>>I know how to do this in VFP, but is there a similar approach in SQL Server?
>>
>>I'd like to drop all indexes (or is it indices?) including the PK from a table, do some maintenance and the recrate the indexes.
>>
>>TIA
Thank's Nigel,
Mike pointed me to Swynk (
http://www.swynk.com/)
where dbinxinfo.txt - Submitted by: Barb Dornbrook posted on 10/11/01
seems to do preety much what I need.
All I need to do now is to do it in two steps - drop indexes (and hang on to the info) do my stuff and then recreate them.
Cheers
Peter Pirker
Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?
(Woody Allen)