Wednesday, May 07, 2008

Import statistics failed due to object out of synch

Elapsed: 00:00:05.57
SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS('DBO','STAT_TABLE',statid=>'run_new',statown=>'DBO');
BEGIN DBMS_STATS.IMPORT_SCHEMA_STATS('DBO','STAT_TABLE',statid=>'run_new',statown=>'DBO'); END;

*
ERROR at line 1:
ORA-20000: partition "CCE_OCT2004" of table "DBO"."CUSTOMER_CONTACT_EVENT" does not exist or insufficient privileges
ORA-06512: at "SYS.DBMS_STATS", line 6712
ORA-06512: at "SYS.DBMS_STATS", line 6738
ORA-06512: at "SYS.DBMS_STATS", line 7270
ORA-06512: at line 1


Elapsed: 00:00:12.92
SQL>
SQL> spool off

select * FROM dbo.stat_table where c5 = 'DBO' and c2='CCE_OCT2004';


SQL> delete FROM dbo.stat_table where c5 = 'DBO' and c2='CCE_OCT2004';

29 rows deleted.

Elapsed: 00:00:00.05

SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS('DBO','STAT_TABLE',statid=>'run_new',statown=>'DBO');
SQL> commit;