Subject Unsuccsessful metadata update when seting statistics
Author ainpoissee
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