ORA-20000: Insufficient privileges to analyze an object in Schema when running a job. (Doc ID 433392.1)

Last updated on DECEMBER 06, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 29-Aug-2016***

Symptoms

Getting the following errors when running a scheduled job to analyze schema stats :

ORA-12012: error on auto execute of job 26
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 10718
ORA-06512: at "SYS.DBMS_STATS", line 10805
ORA-06512: at "SYS.DBMS_STATS", line 10782
ORA-06512: at line 1

The user running the job has DBA role which contains ANALYZE ANY system privilege. Running the job as the owner of the schema succeeds.

.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms