My Oracle Support Banner

Executing DBMS_STATS.GATHER_SYSTEM_STATS in Interval Mode Fails with ORA-27486 insufficient privs (Doc ID 363727.1)

Last updated on APRIL 21, 2022

Applies to:

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

Symptoms

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:

BEGIN DBMS_STATS.GATHER_SYSTEM_STATS(gathering_mode=>'INTERVAL', interval=>1); END;

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

Changes

Upgraded the database from 9.2 to 10g.

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
Changes
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.