COLLECT STATS ACCESS

General
Enthusiast

COLLECT STATS ACCESS

Hi

     When i try to execute the below statement inside a Stored Procedure as below i get an error as stated:

CALL DBC.SYSEXECSQL ('COLLECT STATISTICS ON DBNAME.Table_Name  INDEX (Column1);');  

ERROR:

The user does not have STATISTICS access to DBNAME.Table_Name.

Please help me with the command to grandt access to the user.

Regards

Arun

2 REPLIES
Enthusiast

Re: COLLECT STATS ACCESS

GRANT STATISTICS ON dbname.tablename TO username

Enthusiast

Re: COLLECT STATS ACCESS

Grant statistics is introduced from 13.0.Before 13.0,a user must have had “Index” or “Drop” privileges at the table level to be able to collect statis­tics.