手工安装Oracle全文检索工具
2024-08-29 13:37:01
供稿:网友
在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 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.4.0 - ProductionSQL> 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.logSQL> connect sys/oracleHURRAY as sysdbaConnected.SQL> start ?/ctx/admin/dr0csys passWord oratext temp...creating user CTXSYS...creating role CTXAPPSQL> connect ctxsys/passwordConnected.SQL> start ?/ctx/admin/dr0inst ?/ctx/lib/libctxx9.so============== ConText Database Objects Installation ==============This script must be run as CTXSYS. This script will exitbelow 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 interfacedrop public synonym contains *ERROR at line 1:ORA-01432: public synonym to be dropped does not existdrop public synonym score *ERROR at line 1:ORA-01432: public synonym to be dropped does not exist... creating CTXCAT interfacedrop public synonym catsearch *ERROR at line 1:ORA-01432: public synonym to be dropped does not exist... creating CTXRULE interfacedrop 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.pkhNo errors.... loading dr0def.pkhNo errors....loading drig.pkhNo errors.Install DR Internal package specs... loading driutl.pkhNo errors.... loading driacc.pkhNo errors.... loading driadm.pkhNo errors.... loading dricon.pkhNo errors.... loading dridisp.pkhNo errors.... loading dridml.pkhNo errors.... loading dridoc.pkhNo errors.... loading drierr.pkhNo errors.... loading driddl.pkhNo errors.... loading driddlp.pkhNo errors.... loading driddlc.pkhNo errors.... loading driddlr.pkhNo errors.... loading driddlx.pkhNo errors.... loading drilist.pkhNo errors.... loading driload.pkhNo errors.... loading driopt.pkhNo errors.... loading dripipe.pkhNo errors.... loading dripref.pkhNo errors.... loading drirec.pkhNo errors.... loading drirep.pkhNo errors.... loading drirepm.pkhNo errors.... loading drireps.pkhNo errors.... loading drirept.pkhNo errors.... loading drirepz.pkhNo errors.... loading driths.pkhNo errors.... loading drithsc.pkhNo errors.... loading drithsd.pkhNo errors.... loading drithsl.pkhNo errors.... loading drithsx.pkhNo errors.... loading drival.pkhNo errors.... loading driexp.pkhNo errors.... loading driimp.pkhNo errors.... loading driparse.pkhNo errors.... loading drixtab.pkhNo errors.... loading drixtabc.pkhNo errors.... loading drixtabr.pkhNo errors.... loading drixtabx.pkhNo errors.Install ConText public API specs... loading dr0adm.pkhNo errors.... loading dr0ddl.pkhNo errors.... loading dr0doc.pkhNo errors.... loading dr0out.pkhNo errors.... loading dr0query.pkhNo errors.... loading dr0thes.pkhNo errors.... loading dr0repor.pkhNo errors.
... loading dr0ulex.pkhNo errors.... loading dr0cls.pkhNo errors.... loading package bodies================== Package Installation ==========================Install DR Internal package bodies... loading driacc.plbNo errors.... loading driadm.plbNo errors.... loading dricon.plbNo errors.... loading dridisp.plbNo errors.... loading dridml.plbNo errors.... loading dridoc.plbNo errors.... loading drierr.plbNo errors.... loading driddl.plbNo errors.... loading driddlp.plbNo errors.... loading driddlc.plbNo errors.... loading driddlr.plbNo errors.... loading driddlx.plbNo errors.... loading drilist.plbNo errors.... loading driload.plbNo errors.... loading dripipe.plbNo errors.... loading driopt.plbNo errors.... loading dripref.plbNo errors.... loading drirec.plbNo errors.... loading drirep.plbNo errors.... loading drirepm.plbNo errors.... loading drireps.plbNo errors.... loading drirept.plbNo errors.... loading drirepz.plbNo errors.... loading driths.plbNo errors.... loading drithsc.plbNo errors.... loading drithsd.plbNo errors.... loading drithsl.plbNo errors.... loading drithsx.plbNo errors.... loading driutl.plbNo errors.... loading drival.plbNo errors.... loading driexp.plbNo errors.... loading driimp.plbNo errors.... loading driparse.plbNo errors.... loading drixtab.plbNo errors.... loading drixtabc.plbNo errors.... loading drixtabr.plbNo errors.... loading drixtabx.plbNo errors.... loading driproc.plbNo errors.Install ConText public API bodies... loading dr0adm.plbNo errors.... loading dr0ddl.plbNo errors.... loading dr0doc.plbNo errors.... loading dr0out.plbNo errors.... loading dr0query.plbNo errors.... loading dr0thes.plbNo errors.... loading dr0repor.plbNo errors.... loading dr0cls.plbNo errors.========================================================... creating CONTEXT interface bodyNo errors.No errors.... creating CTXCAT interface bodyNo errors.... creating CTXRULE interface bodyNo errors.... creating CTXXPATH interface bodyNo errors.... creating CONTEXT index typedrop public synonym context *ERROR at line 1:ORA-01432: public synonym to be dropped does not exist... creating CTXCAT index typedrop public synonym ctxcat *ERROR at line 1:ORA-01432: public synonym to be dropped does not exist... creating CTXRULE index typedrop public synonym ctxrule *ERROR at line 1:ORA-01432: public synonym to be dropped does not exist... creating CTXXPATH index typedrop public synonym ctxxpath *ERROR at line 1:ORA-01432: public synonym to be dropped does not exist... creating objectsRemoving old object definitions...Creating new object definitions......creating default preferencesCreate default preferencesSystem Parameters
========================================================SQL> start ?/ctx/admin/defaults/drdefus.sql;Creating lexer preference...Creating wordlist preference...Creating stoplist...Creating default policy...SQL> spool offSQL> exitDisconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.4.0 - Production
请注重假如漏掉drdefus.sql脚本,使用过程中将会出现以下类似错误:
ERROR atline 1:ORA-29855: error occurred in the execution of ODCIINDEXCREATEroutineORA-20000: interMedia Text error:DRG-10700: preference does notexist: CTXSYS.DEFAULT_LEXERORA-06512: at "CTXSYS.DRUE", line 126ORA-06512:at "CTXSYS.TEXTINDEXMETHODS", line 54ORA-06512: at line 1这样就完成了手工安装全文检索工具。
-----