My Oracle Support Banner

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

Last updated on JANUARY 24, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.2 and later
Information in this document applies to any platform.
***Checked for relevance on 03-Mar-2016***

Symptoms

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);
END;

*
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

Cause

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
Symptoms
Cause
Solution


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