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

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2037|回复: 0
打印 上一主题 下一主题

19c ORA-13785: Missing Target Object For Tuning Task “SYS_AUTO_SPM_EVOLVE_TA

[复制链接]
跳转到指定楼层
楼主
发表于 2020-12-7 17:51:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
ORA-13785: Missing Target Object For Tuning Task “SYS_AUTO_SPM_EVOLVE_TASK” (Doc ID 2676633.1)

In this Document
Symptoms
Changes
Cause
Solution
APPLIES TO:
Oracle Database - Standard Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.
SYMPTOMS
ORA-13785: missing target object for tuning task "SYS_AUTO_SPM_EVOLVE_TASK"
OR
ORA-13785: missing target object for tuning task "SYS_AUTO_SQL_TUNING_TASKK"
CHANGES

CAUSE
Missing entry from SYS.WRI$_ADV_TASKS object

Sample output
SELECT ID "TASK_ID", NAME, ADVISOR_NAME, DESCRIPTION
FROM SYS.WRI$_ADV_TASKS
WHERE NAME IN ('SYS_AUTO_SPM_EVOLVE_TASK', 'SYS_AUTO_SQL_TUNING_TASK')
TASK_ID NAME ADVISOR_NAME DESCRIPTION
---------------------------------------- ----------------------- ------------------------
2 SYS_AUTO_SPM_EVOLVE_TASK SPM Evolve Advisor Automatic SPM Evolve Task
1 SYS_AUTO_SQL_TUNING_TASK SQL Tuning Advisor Automatic SQL Tuning Task

SOLUTION
for Symptom of Automatic SPM Evolve Task
SQL> SELECT DBMS_SPM.REPORT_AUTO_EVOLVE_TASK FROM DUAL;
ERROR:
ORA-13785: missing target object for tuning task "SYS_AUTO_SPM_EVOLVE_TASK"

Verify
SELECT ID, TYPE, TASK_ID, ATTR4, ATTR8 FROM SYS.WRI$_ADV_OBJECTS
WHERE TASK_ID IN (SELECT ID FROM SYS.WRI$_ADV_TASKS WHERE NAME = 'SYS_AUTO_SPM_EVOLVE_TASK')
AND ID = 2;   =>>>>>>>>>> Here this number matters, verify this from cause section
Rectify
INSERT INTO SYS.WRI$_ADV_OBJECTS (TASK_ID, ID, TYPE, ATTR8)
VALUES (<SPM_EVOLVE_TASK_ID>,1,25,0);
COMMIT;
EXECUTE DBMS_SPM.RESET_EVOLVE_TASK('SYS_AUTO_SPM_EVOLVE_TASK');
EXECUTE DBMS_SPM.RESUME_EVOLVE_TASK('SYS_AUTO_SPM_EVOLVE_TASK');
Verify if it is working
SELECT DBMS_SPM.REPORT_AUTO_EVOLVE_TASK FROM DUAL;
#########################################################################################
For Symptom of Automatic SQL Tuning Task
SQL> SELECT DBMS_SPM.REPORT_AUTO_EVOLVE_TASK FROM DUAL;
ERROR:
ORA-13785: missing target object for tuning task "SYS_AUTO_SQL_TUNING_TASK"
Verify
SELECT ID, TYPE, TASK_ID, ATTR4, ATTR8 FROM SYS.WRI$_ADV_OBJECTS
WHERE TASK_ID IN (SELECT ID FROM SYS.WRI$_ADV_TASKS WHERE NAME = 'SYS_AUTO_SQL_TUNING_TASK')
AND ID = 1;    =>>>>>>>>>> Here this number matters, verify this from cause section
Rectify
INSERT INTO SYS.WRI$_ADV_OBJECTS (TASK_ID, ID, TYPE, ATTR4)
VALUES (<SQL_TUNING_TASK_ID>,1,22,'SQL Auto Workload Object');
COMMIT;
EXECUTE DBMS_SQLTUNE.RESET_TUNING_TASK('SYS_AUTO_SQL_TUNING_TASK');
EXECUTE DBMS_SPM.RESUME_EVOLVE_TASK('SYS_AUTO_SQL_TUNING_TASK');
Verify if it is working
SELECT DBMS_SPM.SYS_AUTO_SQL_TUNING_TASK FROM DUAL;

If tuning pack licence not purchased we will get below error and in this case do not suggest customer to add manual entry on table
SQL> select owner, task_name, execution_start, execution_end from dba_advisor_executions where task_name like '%SYS_AUTO_SQL%';
no rows selected
2 BEGIN dbms_sqltune.execute_tuning_task('SYS_AUTO_SQL_TUNING_TASK'); END;
*
ERROR at line 1:
ORA-13717: Tuning Package License is needed for using this feature.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-24 20:51 , Processed in 0.076582 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表