Domain sync job SCHEDULER 空白job

select *from dba_scheduler_jobs a where a.owner=''

BEGIN

DBMS_SCHEDULER.DROP_JOB('DRQUICK_TEXTJ');

END;

/

begin

dbms_scheduler.create_job(

job_name => '"DRQUICK_TEXTJ"',

job_type => 'PLSQL_BLOCK',

job_action => 'ctxsys.drvdml.auto_sync_index(''QUICK_TEXT'', 12582912, NULL, NULL,NULL, 0);',

--ctxsys.drvdml.auto_sync_index('"xxxx_DI1"', 536870912, NULL, NULL, NULL, 0);

start_date => (sysdate+(1)),

repeat_interval => 'FREQ=DAILY;INTERVAL=1',

end_date => (sysdate+2),

comments => 'Testing');

end;

/

All Users

Summary

Created an Oracle Text index with SYNC EVERY option. This option will automatically schedule a job to sync the index.

For example:

create index quick_text on quick ( text )

indextype is ctxsys.context

parameters ('sync (every "SYSDATE+15/1440" )');

However, the index currently fails to drop with the following errors:

drop index QUICK_TEXT;

ORA-29856: error occurred in the execution of ODCIINDEXDROP routine

ORA-20000: Oracle Text error:

DRG-50857: oracle error in drvddl.IndexDrop

ORA-27475: "QUICK.DRQUICK_TEXTJ" must be a job

ORA-06512: at "CTXSYS.DRUE", line 160

ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 608

Solution

To implement the solution, please execute the following steps:

  1. For the index that fails to drop, create a "dummy" job to mimic the job created automatically when the index was originally created. For example:

begin

dbms_scheduler.create_job(

job_name => '"DRQUICK_TEXTJ"',

job_type => 'PLSQL_BLOCK',

job_action => 'ctxsys.drvdml.auto_sync_index(''QUICK_TEXT'', 12582912, NULL, NULL,

NULL, 0);',

start_date => (sysdate+(1)),

repeat_interval => 'FREQ=DAILY;INTERVAL=1',

end_date => (sysdate+2),

comments => 'Testing');

end;

/

  1. Once the "dummy" job has been scheduled, drop the index:

drop index quick_text;


Attachments :

Cause

The job automatically scheduled when the index was initially created was manually dropped:

exec DBMS_SCHEDULER.drop_job (job_name => 'DRQUICK_TEXTJ');

The following query sample could be used to view the job automatically scheduled (due to sync every option used). The job will be named DRINDEX_NAMEJ:

Select JOB_NAME, STATE,JOB_TYPE, JOB_ACTION, REPEAT_INTERVAL,

LAST_START_DATE, NEXT_RUN_DATE from DBA_SCHEDULER_JOBS

where JOB_NAME like '%QUICK_TEXT%';

When a Text index is created with the sync every option, a job is automatically scheduled for the index sync routine specified in the create statement. When that index is dropped, internal recursive SQL will locate and drop that associated job automatically. If the job is missing, the drop index statement will fail.

相关推荐
测试盐6 小时前
oracle数据库卡顿排查
数据库·oracle
AI小百科7 小时前
向量数据库:AI 的「记忆仓库」是怎么工作的
数据库·人工智能·oracle
画中有画8 小时前
在自动化脚本中操作本地数据库
数据库·oracle·自动化
LMT流氓兔9 小时前
第五单元——第十六课:给书店助手加上网页界面
java·开发语言·jvm·人工智能·oracle·langchain·1024程序员节
yzs8716 小时前
openGauss branch diff能力解析
数据库·oracle
郭小李16 小时前
spring中@Transactional注解对事务的支持
数据库·spring·oracle
量子物理学19 小时前
oracle plsql instantclient 安装
数据库·oracle
悟道书生2 天前
(一)Navicate为什么转存结构和数据只转存表而不包含建库?
数据库·oracle
时间售卖铺2 天前
Oracle DQL精髓:从基础到高级实战
运维·数据库·云原生·oracle
lusklusklusk2 天前
SQL Server 为什么普通 SELECT 会阻塞 UPDATE?——行级 S 锁到表级 S 锁的锁升级原理与实验验证
数据库·mysql·oracle