Subject Re: plan(pk_xxx) into procedure
Author Alexander V.Nevsky <>
--- In, Danny García Hernández <danny@g...>
> Hello List,
> We have a big database with a lot of SP, some of them are using PLAN
> to speed up selections. I don´t know the reason, but in rare
> one or some proccess corrupt this
> index used into SP´s PLAN and the database become unrestorable

Danny, could'nt you be more specific - what kind of index corruption
do you encounter and what do you mean speaking about unrestorability
of database due to this? Indices are not restored, they are created on
restore using metadata definition (data in system tables) which is
restored. Do you mean corruption of metadata? Exact execption messages
both about index corruption in source database and from gbak when
backing up/restoring will be useful to help you.

> We have a default and hard way to solve that .
> 1- Extract metadata from the corrupt database
> 2-Back and Restore without index
> 3- Create metadata (SP and Views)
> 4- B/R agains
> 5- Finish
> As you can see it´s a uggly process and required lot of time in a
great B/R
> proccess. Some times, we make some change into SP's Blr and the FB
allow us
> delete the SP (Life smile us some times).
> The question !!. Any body know another procedure, of course, more
easy than
> mine?

Usually you can drop damaged procedure if you create empty procedure
and copy it's BLR onto damaged one. It is not simple solution if there
are complex dependencies in the database, so it is better to
understand reasons.

Best regards, Alexander.