1 错误
2023-10-08T13:11:12.127171+08:00
Errors in file /oracle/diag/rdbms/arch/ARCH2/trace/ARCH2_j000_305066.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_154038"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2 解决
$ sqlplus / as sysdba
SQL> EXEC dbms_stats.init_package();
PL/SQL procedure successfully completed.
SQL> column name format A35
SQL> set linesize 120
SQL>
SQL> select name, ctime, how_created
2 from sys.wri$_adv_tasks
3 where owner_name = 'SYS'
4 and name in ('AUTO_STATS_ADVISOR_TASK','INDIVIDUAL_STATS_ADVISOR_TASK');
NAME CTIME HOW_CREATED
----------------------------------- ------------------- ------------------------------
AUTO_STATS_ADVISOR_TASK 2023-10-08 13:19:23 CMD
INDIVIDUAL_STATS_ADVISOR_TASK 2023-10-08 13:19:23 CMD
3 参考
标签:OPT,execute,STATS,name,DBMS,SYS,SQL,ORA From: https://www.cnblogs.com/syksky/p/17748662.htmlORA-12012 Error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_
in 12.2 Database (Doc ID 2127675.1)