Subject | Re: Re-activate indexes |
---|---|
Author | csswa |
Post date | 2002-05-25T03:55:30Z |
--- In ib-support@y..., Brad Pepers <brad@l...> wrote:
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%'
-----
> Is there an easy way to re-activate all indexes in a database. Acustomer has
> had to do a restore and apparently this set all the indexes toinactive and
> he wants to reactivate them all.Hi Brad. This is your answer: group message no. 11366 from Javier
>
> --
> Brad Pepers
> brad@l...
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%'
-----