Subject Re: GBAK and the -i flag
Author David Richmond
--- 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