DBMS_STATS Throws ORA-00979

(Doc ID 376070.1)

Last updated on SEPTEMBER 15, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: and later   [Release: 10.2 and later ]
Information in this document applies to any platform.


When attempting to gather statistics on either the schema level or table level,
the following error occurs:

ORA-00979: not a GROUP BY expression
ORA-06512: at "SYS.DBMS_STATS", line 13056
ORA-06512: at "SYS.DBMS_STATS", line 13076
ORA-06512: at line 2

-- Steps To Reproduce:
The issue can be reproduced at will with the following steps:
1. Execute the following SQL:
dbms_stats.gather_table_stats( '', '', cascade=>true );


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