My Oracle Support Banner

Dbms_stats._gather_schema_stats fails with Insufficient Privs ora-1031 (Doc ID 554871.1)

Last updated on JANUARY 30, 2022

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

DBMS_STATS.GATHER_SCHEMA_STATS fails with error ora-1031

SQL> exec dbms_stats.gather_schema_stats(ownname=>'OWNER1', estimate_percent=>10,cascade=>TRUE);
BEGIN dbms_stats.gather_schema_stats(ownname=>'OWNER1', estimate_percent=>10,cascade=>TRUE);

ERROR at line 1:
ORA-20000: Insufficient privileges to analyze an object in Schema
ORA-06512: at "SYS.DBMS_STATS", line 13310
ORA-06512: at "SYS.DBMS_STATS", line 13669
ORA-06512: at "SYS.DBMS_STATS", line 13747
ORA-06512: at "SYS.DBMS_STATS", line 13706
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!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.