Subject Re: [firebird-support] Unsuccsessful metadata update when seting statistics
Author Hans
All you seem to have to do to get all the statistics updated is:

update rdb$indices set rdb$statistics = -1

----- Original Message -----
From: "ainpoissee" <ainpoissee@...>
To: <firebird-support@yahoogroups.com>
Sent: Friday, May 18, 2007 8:52 AM
Subject: [firebird-support] Unsuccsessful metadata update when seting
statistics


> Hi,
>
> Perhaps this is something to post into devel list, but I try here first...
>
> I use following SP to update index statistics after "batch insert":
>
> CREATE PROCEDURE UpdateSTATISTICS
> AS
> DECLARE IdxName VARCHAR(200);
> BEGIN
> FOR SELECT rdb$index_name FROM rdb$indices INTO :IdxName DO
> BEGIN
> IdxName = 'SET STATISTICS INDEX '||IdxName||';';
> EXECUTE STATEMENT :IdxName;
> END
> END
>
> and now an user reports that he gets error:
>
> Unsuccsessful metadata update MODIFY RDB$INDICES failed no permission
> for control access to TABLE RDB$ROLES at procedure 'UpdateSTATISTICS'
>
> He is connected as the owner of the DB. Server is win SS 2.0.0.12748
>
> Is this is known problem (and fixed in later version)?
>
> Also, perhaps something like WHERE(RDB$SYSTEM_FLAG IS NULL) should be
> used in query to select indices for update?
>
>
> TIA
> ain
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>