重庆思庄Oracle、Redhat认证学习论坛

标题: ORA-20001: Statistics Advisor: Invalid task name for the current user [打印本页]

作者: zhouwei1990    时间: 2018-1-5 16:19
标题: ORA-20001: Statistics Advisor: Invalid task name for the current user
oracle版本:12.2.0.1
问题描述:
alert日志里面一直报出如下错误信息:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_621"
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

错误是在执行统计信息分析的时候报错了,报错原因是由于SCHEDULER的task name无效.
解决方法:
[oracle@12c-test trace]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Jan 5 16:05:40 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name, ctime, how_created
  2    from sys.wri$_adv_tasks
  3   where owner_name = 'SYS'
   and name in ('AUTO_STATS_ADVISOR_TASK','INDIVIDUAL_STATS_ADVISOR_TASK');  4  

no rows selected

SQL> EXEC dbms_stats.init_package();

PL/SQL procedure successfully completed.

SQL> select name, ctime, how_created
  2    from sys.wri$_adv_tasks
  3   where owner_name = 'SYS'
   and name in ('AUTO_STATS_ADVISOR_TASK','INDIVIDUAL_STATS_ADVISOR_TASK');  4  

NAME
--------------------------------------------------------------------------------
CTIME     HOW_CREATED
--------- ------------------------------
AUTO_STATS_ADVISOR_TASK
05-Jan-18 CMD

INDIVIDUAL_STATS_ADVISOR_TASK
05-Jan-18 CMD






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2