DBMS_STATS and ORA-01422
Date: Thu, 11 Sep 2008 10:39:22 -0400
Message-ID: <OF4059334F.E2AACD8D-ON852574C1.004F8E90-852574C1.005081F2@lazard.com>
Hi Gurus,
Recently I migrated one database from 9.2.0.8 to 10.2.0.3 on Solaris 9
(this is test database, copy of production)
Strangely when I tried to update stats on one of the partitioned tables I receive following error:
SQL> exec DBMS_STATS.GATHER_TABLE_STATS
(ownname=>'sysadm',tabname=>'PS_JRNL_LN',estimate_percent=>25,,cascade=>TRUE);
BEGIN DBMS_STATS.GATHER_TABLE_STATS
(ownname=>'sysadm',tabname=>'PS_JRNL_LN',estimate_percent=>25,,cascade=>TRUE);
END;
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at "SYS.DBMS_STATS", line 13182 ORA-06512: at "SYS.DBMS_STATS", line 13202 ORA-06512: at line 1
I checked dual and there is only one row in dual table.
When I run same gather_stats on exact copy of production database still in 9.2.0.8 it ran without any problem.
Has any one encountered this?
One thing I noticed:
Select count(*) from dba_objects where object_name='PS_JRNL_LN' returns
13 rows
while
select count(*) from sys.obj$ where name='PS_JRNL_LN' returns 14 rows.
Additional row in obj$ table has type#=10 which is "NON_EXISTENT" according to comment in DBA_OBJECTS view text.
Any help is greatly appreciated.
Thank you
Mayen Shah
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Sep 11 2008 - 09:39:22 CDT