Twitter

dbca: ORA-20001: Statistics Advisor: Invalid task name for the current user

It looks like using dbca is nowadays quite an adventure; indeed, after few having to use few worakrounds to create a simple RAC database, my dbca 12.2 created database had an alert.log to grow like 200 GB in a week spamming this error message:

2019-09-01 18:53:20.438000 -04:00
Errors in file /u01/app/oracle/diag/rdbms/july2019/july20191/trace/july20191_j000_29383.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_1034"
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

This comes from the known bug 25710407 because of the unavailability of the Stats Advisor Tasks; the fix is fairly easy:
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');

no rows selected

SQL> EXEC dbms_stats.init_package();

PL/SQL procedure successfully completed.

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');

NAME                              CTIME    HOW_CREATED
-----------------------        ---------  -----------------
AUTO_STATS_ADVISOR_TASK         01-SEP-19   CMD
INDIVIDUAL_STATS_ADVISOR_TASK   01-SEP-19   CMD

SQL>

The thing is to know it before the database trace / log files filled your filesystem !

No comments:

Post a Comment

CUDA: getting started on WSL

I have always preferred command line and vi finding it more efficient so after the CUDA: getting started on Windows , let's have a loo...