ERROR at line 1:
ORA-20000: Unable to gather statistics concurrently: Resource manager plan is
not active or is not managing CPU usage
ORA-06512: at "SYS.DBMS_STATS", line 35991
ORA-06512: at line 1
Database was recently upgraded from 11.2 to 12c with concurrent setting to true in both versions
SQL> select dbms_stats.get_prefs ('CONCURRENT') from dual;
Statistics Gathering worked fine on the earlier version
二、解决方法
To avoid the error, either Enable Resource Manager OR Disable concurrent statistics gathering by setting the CONCURRENT preference to OFF. You will need to restart the database to enable these changes.
以下方法二选一:
Enable Resource Manager:
SQL> alter system set resource_manager_plan = 'DEFAULT_PLAN' scope=spfile;
Disable concurrent statistics gathering by setting the CONCURRENT preference to OFF: