"ORA-20000: Insufficient Privileges" When Executing DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC As A Non-SYSDBA User (Doc ID 2046333.1)

Last updated on NOVEMBER 10, 2016

Applies to:

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

Goal

When trying to execute DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC as a non-SYSDBA user, the following errors occur:

SQL> execute DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC;
BEGIN DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC; END;

*
ERROR at line 1:
ORA-20000: Insufficient privileges
ORA-06512: at "SYS.DBMS_STATS", line 44284
ORA-06512: at line 1

 
Is there a way for non-SYSDBA users to execute DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC ?
 

Solution

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