[转帖]oracle全文检索_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
3
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2161 | 回复: 2   主题: [转帖]oracle全文检索        下一篇 
xuefeng
注册用户
等级:上士
经验:315
发帖:69
精华:0
注册:2011-8-17
状态:离线
发送短消息息给xuefeng 加好友    发送短消息息给xuefeng 发消息
发表于: IP:您无权察看 2015-1-21 17:44:02 | [全部帖] [楼主帖] 楼主

问题提出:

在oracle 10.2.0.3中创建oracle全文检索索引时,报错:

CREATE INDEX FILES_CONTENT_IDX ON FILES(CONTENT_URL) INDEXTYPE IS CTXSYS.CONTEXT
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-11422: linguistic initialization failed
DRG-11446: supplied knowledge base file
/u01/app/oracle/product/10.2.0/db_1/ctx/data/enlx/droldUS.dat not installed
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364


解决办法:
1、这是由于oracle全文检索组件在安装时需要用到companion cd,在oracle网站下载相应平台上相应版本的数据库的companion cd,以我的环境为例,需要下载10gr2_aix5l64_companion.cpio.gz
2、解压缩 gunzip 10gr2_aix5164_companion.cpio.gz

 cpio -idmv <10gr2_aix5164_commpanion.cipo


这时候又出现了一个小问题,报错信息如下

cpio: 0511-903 Out of phase!
cpio attempting to continue...
cpio: 0511-904 skipping 732944 bytes to get back in phase!
One or more files lost and the previous file is possibly corrupt!
cpio: 0511-027 The file name length does not match the expected value.


查看cpio命令的用法

$ man cpio
c  Reads and writes header information in ASCII character form. If a cpio archive
was created using the c flag, it must be extracted with c flag.


发现需要加上参数c,再次执行

 cpio -idmvc <10gr2_aix5164_commpanion.cpio


ok了。
3、进入解压后的目录Disk1/stage/Components/oracle.ctx.companion/10.2.0.1.0/1/DataFiles
下面有一些jar包,我们这里需要filegroup1.jar和filegroup2.jar这连个包。

bash-3.2$ unzip filegroup1.jar
Archive:  filegroup1.jar
inflating: ctx/data/enlx/drofdUS.dat
inflating: ctx/data/enlx/drofiUS.dat
inflating: ctx/data/enlx/droldUS.dat
inflating: ctx/data/enlx/droliUS.dat
inflating: ctx/data/enlx/drolkUS.dat
inflating: ctx/data/enlx/drolsUS.dat
bash-3.2$ unzip filegroup2.jar
Archive:  filegroup2.jar
inflating: ctx/data/frlx/drofdF.dat
inflating: ctx/data/frlx/drofiF.dat
inflating: ctx/data/frlx/droldF.dat
inflating: ctx/data/frlx/droliF.dat
inflating: ctx/data/frlx/drolkF.dat
inflating: ctx/data/frlx/drolsF.dat


然后将这些dat文件拷贝到$ORACLE_HOME/ctx/data/对应的目录下。
这下就大功告成了。再次创建oracle text索引错误解除。

扩展知识:
1、oracle 10g全文检索组件是oracle text,安装/卸载方法如下:

The steps of context install on Oracle 10g.
1), create tablespace drsys
2), run @?/ctx/admin/catctx.sql ctxsys drsys temp01 nolock
3), run @?/ctx/admin/defaults/drdefus.sql
4), grant execute on ctxsys.ctx_ddl to public
The steps of context uninstall (remove) on Oracle 10g.
-- run as sys
?/ctx/admin/catnoctx.sql


2、检查是否安装了oracle text组件。

SQL> select comp_name,status from dba_registry;
COMP_NAME                                                                        STATUS
-------------------------------------------------------------------- ---------------------------------
Oracle Database Catalog Views                                        VALID
Oracle Database Packages and Types                            VALID
Oracle Text                                                                              VALID


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
running
注册用户
等级:中尉
经验:491
发帖:0
精华:0
注册:2015-1-20
状态:离线
发送短消息息给running 加好友    发送短消息息给running 发消息
发表于: IP:您无权察看 2015-1-21 22:39:12 | [全部帖] [楼主帖] 2  楼

北京联动北方科技有限公司



赞(0)    操作        顶端 
qq_1415152355172
注册用户
等级:上等兵
经验:141
发帖:0
精华:0
注册:2014-11-5
状态:离线
发送短消息息给qq_1415152355172 加好友    发送短消息息给qq_1415152355172 发消息
发表于: IP:您无权察看 2015-1-22 12:42:58 | [全部帖] [楼主帖] 3  楼

北京联动北方科技有限公司


赞(0)    操作        顶端 
总帖数
3
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论