Extracting Index Definitions. -
03-21-2005
, 08:29 AM
You can use COPYDB to extract the SQL statements to create tables or
views, but not, apparently to extract the SQL statements to create just
the indexes. (at least not with 2.0 under VMS)
I have a script which performs various updates to a copy of the live
database to make it suitable for use as a test database, and some of
those updates involve columns used in indexes. It strikes me that it
may be quicker/better to drop the indexes and recreate them rather than
perform an update on every row which will affect both the base table
and index. However what I want to do is to pick up the index
definitins from the database when the job is run, so as to ensure any
changes to the live database are copied to the test database. I can
determine the indexes that contain the columns affected using iicolumns
and iiindexes, so can set up the procedure to drop them, but I'm
struggling to recreate them in a similar manner |