Re: Error when running dbms_stats

  • From: "Barbara Baker" <barb.baker@xxxxxxxxx>
  • To: Harvinder.Singh@xxxxxxxxxxxxx
  • Date: Wed, 31 Jan 2007 17:44:28 -0700

I run dbms_stats with "gather stale" regularly on a database
(Solaris 9)
For about 2 years, I never saw this error.
Now I get this message about every-other-time I run dbms_stats.
I did a bit of research, and it looked like the solution was to upgrade.
(Not an option for us currently.)

Since I'm not in a position to upgrade, I just re-run the 'gather' script.
It's a pain, and I'm not sure why it worked previously but barfs regularly
now, but I am wondering if something in the schedule changed such that I'm
now working against some other process.

Might be worth looking at what's running concurrently with 'gather_stats' in
your environment.
Sorry, not much help

On 1/31/07, Harvinder Singh <Harvinder.Singh@xxxxxxxxxxxxx> wrote:

This is oracle on RHAT4

-----Original Message-----
From: Harvinder Singh
Sent: Wednesday, January 31, 2007 6:04 PM
To: oracle-l
Subject: Error when running dbms_stats


I am running the following script and getting errors:
dbms_stats.gather_schema_stats(ownname=> 'HS',estimate_percent=>
100,degree=> dbms_stats.auto_degree,granularity=> 'AUTO',method_opt=>
'FOR ALL COLUMNS SIZE AUTO',options=> 'GATHER',cascade=> TRUE);

ERROR at line 1:
ORA-00979: not a GROUP BY expression
ORA-06512: at "SYS.DBMS_STATS", line 13210
ORA-06512: at "SYS.DBMS_STATS", line 13556
ORA-06512: at "SYS.DBMS_STATS", line 13634
ORA-06512: at "SYS.DBMS_STATS", line 13593
ORA-06512: at line 2

This was working before, what can be the possible issue?



Other related posts: