dp
2005-07-19 14:45:48 UTC
HI,
How to reindex a damaged primary key w/o killing the referential integrity?
REINDEX to my knowledge does not fix a damaged index so index usually is
better
so I use
INDEX ON <expr> TAG <tagname> CANDIDATE
ALTER TABLE <tablename> ADD PRIMARY KEY <keyexpr> TAG <tagname>
Only problem if the primary key was used in permanent relations in the DBC
and RI all the relations and RI in the DBC are destroyed after the INDEX ON
command.
So I guess I need some way to save the relations and RI info and then
restore it after indexing the file Granted all the Trigger commands are
still there and so is the RI code but next time I need to change the
database and RI I got to redo it all from scratch
Please advise
TIA
How to reindex a damaged primary key w/o killing the referential integrity?
REINDEX to my knowledge does not fix a damaged index so index usually is
better
so I use
INDEX ON <expr> TAG <tagname> CANDIDATE
ALTER TABLE <tablename> ADD PRIMARY KEY <keyexpr> TAG <tagname>
Only problem if the primary key was used in permanent relations in the DBC
and RI all the relations and RI in the DBC are destroyed after the INDEX ON
command.
So I guess I need some way to save the relations and RI info and then
restore it after indexing the file Granted all the Trigger commands are
still there and so is the RI code but next time I need to change the
database and RI I got to redo it all from scratch
Please advise
TIA