SQL Performance (MOSC)

MOSC Banner

copy table stats from 11g to 12c

edited Apr 19, 2016 7:28PM in SQL Performance (MOSC) 5 commentsAnswered ✓

Hi All,

How to copy table stats  from 11g to 12c? traditional way tranferring is coming up with an error as below,

SQL> exec dbms_stats.import_table_stats('SYSADM','PS_VC_PLAN_MEM', null, 'test_bkp_2');

BEGIN dbms_stats.import_table_stats('SYSADM','PS_VC_PLAN_MEM', null, 'test_bkp_2'); END;

*

ERROR at line 1:

ORA-20002: Version of statistics table "SYSADM"."TEST_BKP_2" is too old.

Please try upgrading it with dbms_stats.upgrade_stat_table

ORA-06512: at "SYS.DBMS_STATS", line 18368

ORA-06512: at line 1

SQL> EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('SYSADM','test_bkp_2');

PL/SQL procedure successfully completed.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center