Executing DBMS_STATS.GATHER_SYSTEM_STATS in Interval Mode Fails with ORA-27486 insufficient privs

(Doc ID 363727.1)

Last updated on MAY 30, 2017

Applies to:

PL/SQL - Version and later
Information in this document applies to any platform.


Executing DBMS_STATS.GATHER_SYSTEM_STATS in interval mode as a user who has been granted the GATHER_SYSTEM_STATISTICS role fails with an ORA-27486 insufficient privileges. Executing the procedure in default mode runs without any errors.

Here is an example illustrating the error:

SQL> create user test1 identified by test1;

User created.

SQL> grant create session, gather_system_statistics to test1;

Grant succeeded.

Sample Output:


ERROR at line 1:
ORA-20003: Unable to gather system statistics
ORA-06512: at "SYS.DBMS_STATS", line 14248
ORA-06512: at line


Upgraded the database from 9.2 to 10g.


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