报错如下:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_88"
ORA-20001: Statistics Advisor: Invalid Task Name For the current user <== Note it
ORA-06512: at "SYS.DBMS_STATS", line 46861
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 734
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 19930
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21934
ORA-06512: at "SYS.DBMS_STATS", line 46851
解决办法:
$ sqlplus / as sysdba
SQL> EXEC dbms_stats.init_package();
参考文档:ORA-12012 Error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_<NN> in 12.2.0 Database version or higher release (like 18c) (文档 ID 2127675.1)