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.

相关推荐
细嗅蔷薇@5 小时前
排序和分⻚(order by 、limit)
数据库·oracle
梦想平凡6 小时前
棋牌游戏技术实战(五):从对局事件重新执行规则,核对棋盘和最终状态
数据库·游戏·oracle
白露与泡影6 小时前
Oracle AI Database 26ai RAC 部署步骤、关键命令与一键脚本
数据库·人工智能·oracle
腾科IT教育9 小时前
Oracle OCP和MySQL OCP怎么选?方向对比指南
mysql·oracle·ocp·oracle ocp·ocp怎么选·mysql ocp
行业研究员19 小时前
Agent Memory降低Token消耗原理解析
数据库·人工智能·oracle·腾讯云·智能体
薛晓刚2 天前
Oracle ADG 备库归档丢了怎么办?RMAN 增量前滚实战
数据库·oracle
阿俊-全栈开发2 天前
LikeShop 版本升级与备份:从旧版平滑迁移的完整步骤
jvm·数据库·oracle·开源·likeshop·likeshop开源商城
蜗牛互联网2 天前
Java Agent 工具调用的 allowlist、参数校验与调用预算
java·开发语言·人工智能·后端·oracle
冰暮流星2 天前
sql之is not null运算符
数据库·sql·oracle
oradh2 天前
Oracle 索引深度解析(从内部原理到实战案例)
数据库·oracle