eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 今天收到了Google的支票 | Blog首页 | 如何使用Oracle全文检索功能? »

如何手工安装Oracle全文检索工具?

在Oracle9i Rlease2中,Oracle的全文检索技术被称为:Oracle Text,功能十分强大。Oracle Text是Oracle9i采用的新名称,在Oracle8/8i中它被称作Oracle interMedia Text,在Oracle8以前它的名称是Oracle ConText Cartridge。
Oracle Text组件可以在安装数据库的时候选择,缺省是安装的,如果没有安装,那么可以按照以下方式手动安装Oracle Text。
1.创建存储表空间
$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Sun May 15 19:54:48 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/h2love/oracle/system01.dbf
/h2love/oracle/undotbs01.dbf
/h2love/oracle/users01.dbf
...

9 rows selected.

SQL> create tablespace oratext
  2  datafile '/h2love/oracle/oratext01.dbf' size 100m
  3  extent management local uniform size 128k
  4  ;      

Tablespace created.

2.创建相关对象
SQL> spool text.log
SQL> connect sys/oracleHURRAY as sysdba
Connected.
SQL> start ?/ctx/admin/dr0csys password oratext temp
...creating user CTXSYS
...creating role CTXAPP
SQL> connect ctxsys/password
Connected.
SQL> start ?/ctx/admin/dr0inst ?/ctx/lib/libctxx9.so
==============  ConText Database Objects Installation ==============

This script must be run as CTXSYS.  This script will exit
below if run as any other user.

User is CTXSYS
... creating tables and Oracle object types
... creating table dr$parameter
... creating table dr$class
... creating table dr$object
... creating table dr$object_attribute
... creating table dr$object_attribute_lov
... creating table dr$preference
... creating table dr$preference_value
... creating table dr$index
... creating table dr$index_partition
... creating table dr$index_value
... creating table dr$policy_tab
... creating table dr$sqe
... creating table dr$ths
... creating table dr$ths_phrase
... creating table dr$ths_fphrase
... creating table dr$ths_bt
... creating table dr$section_group
... creating table dr$section
... creating table dr$stoplist
... creating table dr$stopword
... creating table dr$sub_lexer
... creating table dr$index_set
... creating table dr$index_set_index
... creating table dr$server
... creating table dr$pending
... creating table dr$waiting
... creating table dr$online_pending
... creating table dr$delete
... creating table dr$unindexed
... creating table dr$index_error
... creating table dr$parallel
... creating table dr$stats
... creating table dr$part_stats
... creating named data type ctx_feedback_item_type
... creating named data type ctx_feedback_type
... creating safe callout library
... creating CONTEXT interface
drop public synonym contains
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


drop public synonym score
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating CTXCAT interface
drop public synonym catsearch
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating CTXRULE interface
drop public synonym matches
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating CTXXPATH interface
... loading package headers
================== Package Installation ==========================
Install Global Symbols
... loading driobj.pkh
No errors.
... loading dr0def.pkh
No errors.
...loading drig.pkh
No errors.
Install DR Internal package specs
... loading driutl.pkh
No errors.
... loading driacc.pkh
No errors.
... loading driadm.pkh
No errors.
... loading dricon.pkh
No errors.
... loading dridisp.pkh
No errors.
... loading dridml.pkh
No errors.
... loading dridoc.pkh
No errors.
... loading drierr.pkh
No errors.
... loading driddl.pkh
No errors.
... loading driddlp.pkh
No errors.
... loading driddlc.pkh
No errors.
... loading driddlr.pkh
No errors.
... loading driddlx.pkh
No errors.
... loading drilist.pkh
No errors.
... loading driload.pkh
No errors.
... loading driopt.pkh
No errors.
... loading dripipe.pkh
No errors.
... loading dripref.pkh
No errors.
... loading drirec.pkh
No errors.
... loading drirep.pkh
No errors.
... loading drirepm.pkh
No errors.
... loading drireps.pkh
No errors.
... loading drirept.pkh
No errors.
... loading drirepz.pkh
No errors.
... loading driths.pkh
No errors.
... loading drithsc.pkh
No errors.
... loading drithsd.pkh
No errors.
... loading drithsl.pkh
No errors.
... loading drithsx.pkh
No errors.
... loading drival.pkh
No errors.
... loading driexp.pkh
No errors.
... loading driimp.pkh
No errors.
... loading driparse.pkh
No errors.
... loading drixtab.pkh
No errors.
... loading drixtabc.pkh
No errors.
... loading drixtabr.pkh
No errors.
... loading drixtabx.pkh
No errors.
Install ConText public API specs
... loading dr0adm.pkh
No errors.
... loading dr0ddl.pkh
No errors.
... loading dr0doc.pkh
No errors.
... loading dr0out.pkh
No errors.
... loading dr0query.pkh
No errors.
... loading dr0thes.pkh
No errors.
... loading dr0repor.pkh
No errors.
... loading dr0ulex.pkh
No errors.
... loading dr0cls.pkh
No errors.
... loading package bodies
================== Package Installation ==========================
Install DR Internal package bodies
... loading driacc.plb
No errors.
... loading driadm.plb
No errors.
... loading dricon.plb
No errors.
... loading dridisp.plb
No errors.
... loading dridml.plb
No errors.
... loading dridoc.plb
No errors.
... loading drierr.plb
No errors.
... loading driddl.plb
No errors.
... loading driddlp.plb
No errors.
... loading driddlc.plb
No errors.
... loading driddlr.plb
No errors.
... loading driddlx.plb
No errors.
... loading drilist.plb
No errors.
... loading driload.plb
No errors.
... loading dripipe.plb
No errors.
... loading driopt.plb
No errors.
... loading dripref.plb
No errors.
... loading drirec.plb
No errors.
... loading drirep.plb
No errors.
... loading drirepm.plb
No errors.
... loading drireps.plb
No errors.
... loading drirept.plb
No errors.
... loading drirepz.plb
No errors.
... loading driths.plb
No errors.
... loading drithsc.plb
No errors.
... loading drithsd.plb
No errors.
... loading drithsl.plb
No errors.
... loading drithsx.plb
No errors.
... loading driutl.plb
No errors.
... loading drival.plb
No errors.
... loading driexp.plb
No errors.
... loading driimp.plb
No errors.
... loading driparse.plb
No errors.
... loading drixtab.plb
No errors.
... loading drixtabc.plb
No errors.
... loading drixtabr.plb
No errors.
... loading drixtabx.plb
No errors.
... loading driproc.plb
No errors.
Install ConText public API bodies
... loading dr0adm.plb
No errors.
... loading dr0ddl.plb
No errors.
... loading dr0doc.plb
No errors.
... loading dr0out.plb
No errors.
... loading dr0query.plb
No errors.
... loading dr0thes.plb
No errors.
... loading dr0repor.plb
No errors.
... loading dr0cls.plb
No errors.
========================================================
... creating CONTEXT interface body
No errors.
No errors.
... creating CTXCAT interface body
No errors.
... creating CTXRULE interface body
No errors.
... creating CTXXPATH interface body
No errors.
... creating CONTEXT index type
drop public synonym context
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating CTXCAT index type
drop public synonym ctxcat
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating CTXRULE index type
drop public synonym ctxrule
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating CTXXPATH index type
drop public synonym ctxxpath
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist


... creating objects
Removing old object definitions...
Creating new object definitions...
...creating default preferences
Create default preferences
System Parameters
========================================================
SQL> start ?/ctx/admin/defaults/drdefus.sql;
Creating lexer preference...
Creating wordlist preference...
Creating stoplist...
Creating default policy...
SQL> spool off
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

请注意如果漏掉drdefus.sql脚本,使用过程中将会出现以下类似错误:
ERROR atline 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATEroutine
ORA-20000: interMedia Text error:
DRG-10700: preference does notexist: CTXSYS.DEFAULT_LEXER
ORA-06512: at "CTXSYS.DRUE", line 126
ORA-06512:at "CTXSYS.TEXTINDEXMETHODS", line 54
ORA-06512: at line 1



这样就完成了手工安装全文检索工具。

历史上的今天...
    >> 2012-06-11文章:
    >> 2011-06-11文章:
    >> 2009-06-11文章:
    >> 2008-06-11文章:
           Oracle 10g RAC的相关概念
    >> 2007-06-11文章:
    >> 2006-06-11文章:
           中国移动之心-谁与争锋

无觅

By eygle on 2005-06-11 00:17 | Comments (6) | Advanced | HowTo | 302 |

6 Comments

建议你的程序段部分不要采用这种深暗颜色作为背景,看起来很费劲,伤眼睛!希望可以改进一下:)谢谢

谁能给我调一段好用的颜色代码呢:)

Good. Good.
刚好用到。

10g just run catctx.sql

如yanggq所说, 10g中执行catctx.sql, 但还是需要执行drdefus.sql的. 如下过程已经过测试:

http://www.itpub.net/viewthread.php?tid=927770&pid=9464807&page=1&extra=

SQL> start ?/ctx/admin/dr0csys syspassword(这个是sys用户的密码吧?) DRSYS temp;
SP2-0310: unable to open file "/ora10run/app/oracle/product/10.2.0/ctx/admin/dr0csys.sql"

怎么找不到这个文件啊?
我在另外一个装了oracle text组件的数据库里也查不到这个文件。


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com