zoukankan      html  css  js  c++  java
  • ORA-12012: 自动执行作业 "SYS"."ORA$AT_OS_OPT_SY_21" 出错

    oracle 12.2.0.1版本报错:

    Errors in file /u01/app/oracle/diag/rdbms/easdb/easdb2/trace/easdb2_j000_27520.trc:
    ORA-12012: 自动执行作业 "SYS"."ORA$AT_OS_OPT_SY_21" 出错
    ORA-20001: Statistics Advisor: Invalid task name for the current user
    ORA-06512: 在 "SYS.DBMS_STATS", line 47207
    ORA-06512: 在 "SYS.DBMS_STATS_ADVISOR", line 882
    ORA-06512: 在 "SYS.DBMS_STATS_INTERNAL", line 20059
    ORA-06512: 在 "SYS.DBMS_STATS_INTERNAL", line 22201
    ORA-06512: 在 "SYS.DBMS_STATS", line 47197

    错误是在执行统计信息分析的时由于SCHEDULER的task name无效.

    解决方法:

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

    no rows selected

    Elapsed: 00:00:00.03
    SQL> EXEC dbms_stats.init_package();

    PL/SQL procedure successfully completed.

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

    NAME
    ------------------------------------------------------------------------------------------------------------------------
    CTIME HOW_CREATED
    ------------ ------------------------------------------------------------
    AUTO_STATS_ADVISOR_TASK
    13-JUN-18 CMD

    INDIVIDUAL_STATS_ADVISOR_TASK
    13-JUN-18 CMD


    Elapsed: 00:00:00.01
    SQL>

  • 相关阅读:
    编程与操作系统
    maven环境快速搭建
    Maven那点事儿(Eclipse版)
    几种简单的负载均衡算法及其Java代码实现
    Java集合中那些类是线程安全的
    自己随手的一些知识点
    设计模式(一)—— 策略模式
    Unity Audio Source Properties
    [转载]Web前端和后端之区分,以及面临的挑战
    TestNG 与 Junit的比较(转)
  • 原文地址:https://www.cnblogs.com/zougang/p/9178937.html
Copyright © 2011-2022 走看看