copy table stats from 11g to 12c
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.