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.

相关推荐
杨凯凡3 天前
IT日报|2026-11-19:Oracle Java 紧急补丁、Optimizely 供应链攻击、GitHub 安全评估升级
java·oracle·github
OxYGC4 天前
[Web3] 智能合约 13: 项目实战⑤ DappLink Oracle
oracle·web3·智能合约
Lucifer三思而后行4 天前
Oracle RAC 启动失败,DBA 如何一步步定位问题?
oracle·rac
tianyuanwo6 天前
NocoDB 系统手册:PostgreSQL 主机资产管理的界面层实施方案
数据库·postgresql·oracle
隔窗听雨眠9 天前
Oracle日志体系分层结构与故障定位路径
数据库·oracle·故障排查
曲径海盗9 天前
Try-Except怎么用,3个追问解答在自动化下的应用
java·jvm·oracle
爱吃奥利奥_wen12 天前
SQL Server 基础语法详解:从建库建表到约束与增删改查
服务器·数据库·oracle
x_SpiderMan12 天前
搭建Oracle RAC 集群
数据库·oracle
测试界的小码农12 天前
【图数据库实战进阶(03):Neo4j 图数据建模实战——节点、关系与属性应该怎么设计?】
数据库·oracle·neo4j
.痞老板.13 天前
mysql初阶--数据库设计
数据库·mysql·oracle