【发布时间】:2014-05-02 10:06:46
【问题描述】:
我目前正在将 Oracle 9i 数据库(*.dmp 文件)迁移到 Oracle 11g 数据库。 为此,我使用 exp 和 imp Oracle 实用程序命令行:
exp USERID=<user>/<password>@<database> FILE=<path> OWNER=<owner>
然后我创建一个skeleton.sql 文件,该文件将创建表、索引表并最终创建索引。
imp <user>/<password>@<database> FILE=<path> INDEXFILE="<path>\skeleton.sql" FROMUSER=<fromuser> TOUSER=<touser>
在此迁移过程中,我能够正确导入大部分数据,当然,从一个数据库到另一个数据库的表空间保持不变以避免任何冲突。
但是问题来了。在 Oracle 11g 中,不再支持 KOREAN_LEXER,您必须使用 KOREAN_MORPH_LEXER。为此,我执行以下 SQL 命令:
call ctx_ddl.create_preference('korean_lexer','korean_morph_lexer');
call ctx_ddl.add_sub_lexer('global_lexer','korean','korean_lexer',null);
然后我导入skeleton.sql文件,以便在导入前注入需要的数据:
sqlplus <user>/<password>@<database> @<path>\skeleton.sql
表和索引表的创建进展顺利,直到我创建的 150 多个索引中的每一个都出现以下错误:
CREATE INDEX "<schema>"."WORKORDER_NDX16" ON "WORKORDER"
ERROR at line 1 :
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10502: WORKORDER_NDX16 index does not exist
DRG-13201: KOREAN_LEXER is no longer supported
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
索引仍在创建中,此消息只是一个警告。 我尝试重建任何损坏的索引:
ALTER index WORKORDER_NDX16 REBUILD;
这又给了我以下错误:
SQL Error : ORA-29874: warning in the execution of ODCIINDEXCREATE routine
ORA-29960: ligne 1,
DRG-10595: failure on ALTER INDEX WORKORDER_NDX16
DRG-50857: oracle error in drixmd.PurgeKGL
ORA-20000: Oracle Text error:
DRG-13201: KOREAN_LEXER is no longer supported
ORA-30576: ConText Option dictionary loading error
DRG-50610: internal error: kglpurge []
29874. 00000 - "warning in the execution of ODCIINDEXALTER routine"
*Cause: A waring was returned from the ODCIIndexAlter routine.
*Action: Check to see if the routine has been coded correctly
Check the user defined warning log tables for greater details.
在我的 skeleton.sql 文件中,在每个索引的创建下,每种语言都有以下几行:
ctxsys.driimp.set_object('LEXER','MULTI_LEXER',12);
...
ctxsys.driimp.set_sub_value('SUB_LEXER','8', NULL, NULL,'KO:KOREAN_LEXER:');
...
到目前为止,我不知道该怎么做,这似乎是一个很容易解决的问题,但我的 dba 技能太低,无法独自完成。
如果有人可以帮助我,我将不胜感激!
谢谢。
【问题讨论】: