Friday, May 4, 2012

dbms_stats.gather_system_stats errors to stop

Over the weekend I upgraded two databases to 11.2.0.3, Upgrade was successful.

I ran dbms_stats.gather_system_stats to gather system statistics on both the database.
After two days I wanted to stop it.


On one database it errors

oracle@proddb[PRD1]$ sy

SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 11 07:50:01 2012

Copyright (c) 1982, 2011, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> execute dbms_stats.gather_system_stats('stop');
BEGIN dbms_stats.gather_system_stats('stop'); END;

*
ERROR at line 1:
ORA-01426: numeric overflow
ORA-06512: at "SYS.DBMS_STATS", line 27218
ORA-06512: at line 1


SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
oracle@proddb[PRD1]$


On the other database it went fine and stopped
oracle@proddb[OWB]$ sy

SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 11 07:50:29 2012

Copyright (c) 1982, 2011, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> execute dbms_stats.gather_system_stats('stop');

PL/SQL procedure successfully completed.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
oracle@proddb[OWB]$







A lot of analysis was done with Oracle Support but in the end I found a simple workaround start and stop again worked;



SQL> execute dbms_stats.gather_system_stats('start');

PL/SQL procedure successfully completed.

SQL> execute dbms_stats.gather_system_stats('stop');

PL/SQL procedure successfully completed.

SQL>



Oracle Support has filed a defect for this tool.

Popular Posts