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.

相关推荐
TLA技术2 小时前
LogMiner vs 裸日志解析(三):Oracle日志解析中的“前镜像”和“后镜像”,到底怎么用?
数据库·oracle·flink·dba·迁移学习
点纭1 天前
C 语言 第七章 常用函数(3)
c语言·开发语言·算法·oracle·c#
oradh2 天前
Oracle Undo问题总结(ORA-600 [4xxx] 系列错误)
数据库·oracle
达梦数据2 天前
DMDRS辅助表生成规则与作用
数据库·oracle
达梦数据2 天前
DMDRS空间数据类型说明:Oracle、DM8、MySQL空间数据类型映射
数据库·mysql·oracle
lusklusklusk2 天前
Oracle索引组织表,SQLServer聚集索引,Mysql Innodb表的数据行不是在磁盘上像排队一样严格连续地存放
mysql·postgresql·oracle·sqlserver
Lucifer三思而后行3 天前
Oracle SQL 优化实战:明明走了索引,SQL 还是慢?
sql·oracle
DarkAthena3 天前
【DuckDB】在DuckDB中查询ORACLE的数据的三种方式
oracle·duckdb
风123456789~3 天前
【Oracle专栏】更新多个表的统计信息
oracle