For the newly installed Oracle 18C database, the alert log keeps making errors:
ORA-12012: error on auto execute of job
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_222"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 49538
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 881
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21631
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 23763
ORA-06512: at "SYS.DBMS_STATS", line 49526
2022-02-28 01:27:20.762000 +08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_j000_104148.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_224"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 49538
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 881
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21631
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 23763
ORA-06512: at "SYS.DBMS_STATS", line 49526
2022-02-28 01:37:21.758000 +08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_j000_104738.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_226"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 49538
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 881
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21631
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 23763
ORA-06512: at "SYS.DBMS_STATS", line 49526
Solution:
Call the initialization package manually: go to sqlplus as administrator
1. sqlplus / as sysdba
2. check the current auto task belongs to the user already exists, if not then initialize the package
3. EXEC dbms_stats.init_package();
4. Confirm again
SQL> column name format A35
SQL> set linesize 120
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 28-FEB-22 CMD
INDIVIDUAL_STATS_ADVISOR_TASK 28-FEB-22 CMD
Read More:
- [Solved] Oracle 18C RAC Install Error: Error in invoking target ‘irman ioracle idrdactl idrdalsnr idrdaproc‘ of makefile
- Clickhouse error: XXXX.XXXX_local20211009 (8fdb18e9-bb4c-42d8-8fdb-18e9bb4c02d8): auto…
- [Solved] lightdb oracle_fdw Error: ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle
- Error during job, obtaining debugging information [How to Solve]
- New Spring boot startup error Failed to auto-configure a DataSource
- [Solved] KEIL Error: keil Error: failed to execute ‘C:\Keil\ARM\ARMCC‘
- Error starting ApplicationContext. To display the auto-configuration report re-run your application
- ORA-12505 error when java connects to oracle database
- Oracle Start as DBA Error [How to Solve]
- [Solved] ora 01033 linux,ORA-01033: ORACLE initialization or shutdown in progres
- git_error:unable to auto-detect email address [How to Solve]
- MAC-XXL_JOB Error: Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log
- Spring bean object cannot be injected into quartz job
- [Solved] Job for docker.service failed because the control process exited with error
- Oracle Database Cannot Open mount Mode Error: ORA-01102
- Oracle monitoring error tns-01189 [How to Solve]
- [Solved] Job for mysqld.service failed because the control process exited with error code.
- [Solved] Navicat Connect Error: Oracle library is not loaded.
- [Solved] Hive execute insert overwrite error: could not be cleared up
- [Solved] Postgres Start Error: Job for postgresql.service failed because the control process exited with error code.