2013-12-23 66 views
2

獲取以下錯誤以創建使用CTXSYS.AUTO_FILTER的索引。Oracle 11g首選項不存在:CTXSYS.AUTO_FILTER

ORA-20000: Oracle Text error: 
DRG-10700: preference does not exist: CTXSYS.AUTO_FILTER 
ORA-06512: at "CTXSYS.DRUE", line 160 
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366 

我想需要運行一些腳本,可以重新創建CTXSYS.AUTO_FILTER首選項。 要運行哪個腳本?使用Oracle 11g

回答

1

首先檢查

SELECT * 
FROM CTXSYS.CTX_PREFERENCES 

,然後如果必要的話:

ctx_ddl.create_preference('AUTO_FILTER', 'AUTO_FILTER'); 
1

或多個自動:

declare 
    filter_count number; 
begin 
select count(*) into filter_count FROM CTXSYS.CTX_PREFERENCES WHERE PRE_NAME = 'AUTO_FILTER'; 
IF filter_count = 0 THEN 
    ctx_ddl.create_preference('AUTO_FILTER', 'AUTO_FILTER'); 
END IF; 
end; 
/