linuxsir首页 LinuxSir.Org | Linux、BSD、Solaris、Unix | 开源传万世,因有我参与欢迎您!
网站首页 | 设为首页 | 加入收藏
您所在的位置:主页 > Linux数据库 >

Orace 12.2 ORA

时间:2019-01-26  来源:未知  作者:admin666

一个测试环境的Oracle 12.2.0.1数据库后台alert不断报出以下错误信息:

Errors in file /d12/app/oracle/diag/rdbms/test/test/trace/test_j001_4981.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_21"
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

看了一下报错频率,大概是每隔10分钟报一次。该库是12.2.0.1的CDB,其中还有两个pdb。

从MOS找到一篇对应的文章:ORA-12012 Error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_ NN in 12.2 Database (Doc ID 2127675.1)

分析可能是在建库的时候没有执行dbms_stats.init_package()

$ 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            17-JUN-17 CMD
INDIVIDUAL_STATS_ADVISOR_TASK      17-JUN-17 CMD

执行结束后,观察日志,不再继续报错!

更多Oracle相关信息见Oracle 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=12

Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx

友情链接