Subject Re: [firebird-support] Re: GBAK and the -i flag
Author Tom Miller
David Richmond wrote:
> --- Tom Miller wrote:
>
>> Turning off the indexes during restore makes a big difference during
>> restore, but I noticed that the indexes do not get activated after
>> restore is complete. Is their a simple way to do this (after the
>> restore is complete) from the command line.
>>
>
>
> http://www.firebirdfaq.org/faq274
>
> Run the following query:
>
> SET TERM !! ;
>
> EXECUTE BLOCK AS
> DECLARE VARIABLE stmt VARCHAR(1000);
> BEGIN
> for select 'ALTER INDEX '||rdb$index_name ||' ACTIVE;'
> from rdb$indices
> where rdb$system_flag is not null and rdb$system_flag = 0
> into :stmt
> do EXECUTE STATEMENT :stmt;
> END!!
>
> SET TERM ; !!
>
> Regards,
> Dave
>

Thanks. I guess I should have assumed I am not the first to have this
need, which begs the question on whether another flag should be added to
GBAK -ia maybe, so they last thing GBAK does before it exists is
activates all the indexes.

Thanks.