ORA-20000 'Insufficient Privileges' While Executing DBMS_STATS.GATHER_SCHEMA_STATS
(Doc ID 309834.1)
Last updated on AUGUST 04, 2018
Applies to:Oracle Database - Enterprise Edition - Version 18.104.22.168 and later
Information in this document applies to any platform.
ORA-20000 while executing "dbms_stats.gather_schema_stats" is dumped while trying to generate statistics.
Example of the error:
Connect as user ABC.
User ABC has DBA role granted.
DBA role includes "analyze any" system privilege.
Also granted "analyze any" privilege explicitly to user ABC.
BEGIN dbms_stats.gather_schema_stats('SCOTT',degree=>4,cascade=>TRUE,estimate_percent=>35); END;
ERROR at line 1:
ORA-20000: Insufficient privileges to analyze an object in Schema
ORA-06512: at "SYS.DBMS_STATS", line 10583
ORA-06512: at "SYS.DBMS_STATS", line 10751
ORA-06512: at "SYS.DBMS_STATS", line 10805
ORA-06512: at "SYS.DBMS_STATS", line 10782
ORA-06512: at line 1
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!