Subject Re: help: reactivate indexes after gbak -inactive
Author elleffeci
> The dangers are that you are directly manipulating the system table
> data and risk corruption. Whether this particular statement would
> cause an issue I can not comment. If you do decide to directly play
> with the system tables, make a backup before you do. Also, once you
> have made the change, do a backup-restore to make sure nothing is
corrupt.
>
> A better way to go is to run a query to get the index names from the
> system tables and generate the DDL to do it properly. Here is a start
>
> select 'ALTER INDEX ' || RDB$INDEX_NAME || ' ACTIVE;'
> from RDB$INDICES
>
> Run it in iSQL and then copy the output into clipboard, then run it.
>
> The safest and perhaps most boring way is to use a data pumping tool
> (IBDataPump etc) to fix these sorts of problems. If you can get an
> empty database with the same structure (which you can often use gbak
> -m) that is the hardest part.
>
> Adam
>


Adam,
thank you for your suggestions.
I have already tried your solution but the indices are both primary
and foreign and I get lots of errors on tables that seem to be
'occupied'...
like 'object XYZ is in use'.
I tried to activate PRIMARY indexes first, and then FOREIGN keys.
Primary indexes went OK,
still have to try with foreign keys,
will post the results.
Cheers,
Luca.