Subject Re: Re-activate indexes
Author csswa
--- In ib-support@y..., Brad Pepers <brad@l...> wrote:
> Is there an easy way to re-activate all indexes in a database. A
customer has
> had to do a restore and apparently this set all the indexes to
inactive and
> he wants to reactivate them all.
>
> --
> Brad Pepers
> brad@l...

Hi Brad. This is your answer: group message no. 11366 from Javier
Castro. A snippet follows.

Regards,
Andrew Ferguson
-- How's my typing? Tell me at www.byte.me.com


-----

Next, we activate the PK indices

update rdb$indices
set rdb$index_inactive = 0
where rdb$index_inactive = 1
and rdb$index_name like 'RDB$PRIMARY%'

Then the FK indices

update rdb$indices
set rdb$index_inactive = 0
where rdb$index_inactive = 1
and rdb$index_name like 'RDB$FOREIGN%'

Then the rest of the indices

update rdb$indices
set rdb$index_inactive = 0
where rdb$index_inactive = 1
and rdb$index_name not like 'RDB$FOREIGN%' and
rdb$index_name not like 'RDB$PRIMARY%'

-----