Save yourself time and effort. Buy Stonefield Data Tools. It does all this and more.
>Hello world,
>
>I would like to get all the information on the indexes in a database so I can recreate the indexes from scratch.
>
>I have two purposes, 1) thoroughly "reindex" the tables, and 2) back up the tables without the indexes, and then rebuild the indexes in the event of a restore. Concerning 1), Menachem Bazian has written that CDX files can bloat, and this can only be remedied with DELETE TAG ALL, after which one must reconstruct the persistent relations in the database. Concerning 2), I have a back up bottleneck, and it would be convenient to eliminate the CDX files from the back up set.
>
>I can get the tag names and kex expressions from the TAG() and KEY() functions. I can get the primary key tag with dbGetProp(). How do I get the order (ascending or descending), the index type (candidate, unique, regular) for non-primary tags, and whether there is a filter?
>
>Any general comments, suggestions or caveats conerning this approach?
>
>Thanks,
>
>Rick Graves (displaced American currently residing in Hong Kong)
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer