手工建立oracle text全文檢索元件
This note assumes the Oracle software is installed into the $ORACLE_HOME.
On Unix, the environment variable LD_LIBRARY_PATH must be set to
$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
============================================
Note: In SQL*Plus we use '?' instead of $ORACLE_HOME
------------------- cut here ------------------------------
connect SYS/password as SYSDBA
set echo on
col comp_name for a30
spool textinstall.log
Rem =======================================================================
Rem Start of Text loading
Rem =======================================================================
EXECUTE dbms_registry.loading('CONTEXT', 'Oracle Text');
Rem dr0csys.sql
start ?/ctx/admin/dr0csys ctxsys DRSYS TEMP
*** NOTE: We assume that DRSYS tablespace already exists, if not create a
*** tablespace for Oracle Text data dictionary tables, for example:
*** SQL> CREATE TABLESPACE tablespace_name
*** DATAFILE 'ORACLE_BASEoradatadb_namedrsys01.dbf' SIZE 40m;
REM ========================================================================
REM Install CTXSYS objects
REM ========================================================================
connect CTXSYS/ctxsys
start ?/ctx/admin/dr0inst
start ?/ctx/admin/defaults/drdefus.sql
REM ========================================================================
REM Upgrade CTXSYS to the latest patchset version
REM ========================================================================
connect SYS/password as SYSDBA
start ?/ctx/admin/ctxpatch.sql
select comp_name, version, status from dba_registry;
spool off
exit;
------------------- cut here ------------------------------
Review the output file textinstall.log for errors.
Installation of Oracle Text 9.2.0.x is complete.
Explanation of installation script
==================================
You need to be connected as SYS to create CTXSYS user
connect SYS/password as SYSDBA
EXECUTE dbms_registry.loading('CONTEXT', 'Oracle Text');
This will update the DBA_REGISTRY for Oracle Text loading.
start ?/ctx/admin/dr0csys ctxsys DRSYS TEMP
ctxsys - is the ctxsys user password
DRSYS - is the default tablespace for ctxsys
TEMP - is the temporary tablespace for ctxsys
This script sets up the ctxsys user, which owns the text
supporting tables. At this point it will have no objects.
Than we connect as CTXSYS user to create necessary objects.
connect CTXSYS/ctxsys
start ?/ctx/admin/dr0inst
On Solaris, Aix platform with $ORACLE_HOME of /u1/app/oracle/product/9.2.0
this part should look like:
start ?/ctx/admin/dr0inst /u1/app/oracle/product/9.2.0/ctx/lib/libctxx9.so
On HP-UX you would run:
start ?/ctx/admin/dr0inst /u1/app/oracle/product/9.2.0/ctx/lib/libctxx9.sl
With NT you would run with %ORACLE_HOME% of C:oracle9.2.0
start ?ctxadmindr0inst C:oracle9.2.0inoractxx9.dll
*** Note: The error ORA-01031: insufficient privileges while CTXSYS
*** calls the dbms_registry package can be ignored, see
Last script that is called installs defaults preferences: default lexer,
wordlist and stoplist.
This scripts are located in $ORACLE_HOME/ctx/admin/defaults and name of
scripts is drdef
In above example we run US specific script
start ?/ctx/admin/defaults/drdefus.sql
Then we connect as SYS user to upgrade Text to the latest Patchset version.
DBA_REGISTRY is also updated to the correct Oracle Text version, status.
connect SYS/password as SYSDBA
start ?/ctx/admin/ctxpatch.sql
*** Note: ERROR ORA-00001: unique constraint (CTXSYS.DRC$OAT_KEY) violated
*** Above error shows that the insert fails as the record with unique
*** value in that table exist.
*** That means the record that needs to be inserted is already existing
*** and hence can be ignored.
Text Installation verification
-------------------------------
1. Check to make sure that all Text objects were created in CTXSYS schema
and correct version is installed
2. Check to make sure that there are not invalid objects for CTXSYS.
You should get: "no rows selected"
If there are then you can compile each invalid object manually.
3. Check to ensure that the library is correctly installed
------------------- cut here ------------------------------
connect SYS/password as SYSDBA
set pages 1000
col object_name format a40
col object_type format a20
col comp_name format a30
column library_name format a8
column file_spec format a60 wrap
spool text_install_verification.log
-- check on setup
select comp_name, status, substr(version,1,10) as version
from dba_registry
where comp_id = 'CONTEXT';
select * from ctxsys.ctx_version;
select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
select count(*)
from dba_objects where owner='CTXSYS';
-- Get a summary count
select object_type, count(*)
from dba_objects where owner='CTXSYS'
group by object_type;
-- Any invalid objects
select object_name, object_type, status
from dba_objects
where owner='CTXSYS'
and status != 'VALID'
order by object_name;
select library_name,file_spec,dynamic,status
from all_libraries
where owner = 'CTXSYS';
------------------- cut here ------------------------------
Example output of text_install_verification.log after valid installtion of
9.2.0.5.0 on Solaris. The number of ctxsys objects might differentiate after
applying a patchset.
-------------------------------------------------------------------------------
SQL> select comp_name, status, substr(version,1,10) as version
from dba_registry
where comp_id = 'CONTEXT';
COMP_NAME STATUS VERSION
------------------------------ ----------- ------------------------------
Oracle Text VALID 9.2.0.5.0
SQL> select * from ctxsys.ctx_version;
VER_DICT VER_CODE
--------- ---------------------------
9.2.0.5.0 9.2.0.5.0
SQL> select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
VER_CODE
------------------------------
9.2.0.5.0
SQL> select count(*)
from dba_objects where owner='CTXSYS';
COUNT(*)
----------
263
SQL> select object_type, count(*)
from dba_objects where owner='CTXSYS'
group by object_type;
OBJECT_TYPE COUNT(*)
-------------------- ----------
FUNCTION 3
INDEX 46
INDEXTYPE 4
LIBRARY 2
LOB 2
OPERATOR 5
PACKAGE 53
PACKAGE BODY 44
PROCEDURE 1
SEQUENCE 3
TABLE 36
TYPE 10
TYPE BODY 7
VIEW 47
14 rows selected.
SQL> select object_name, object_type, status
from dba_objects
where owner='CTXSYS'
and status != 'VALID'
order by object_name;
no rows selected
SQL> select library_name,file_spec,dynamic,status
from all_libraries
where owner = 'CTXSYS';
LIBRARY_ FILE_SPEC D STATUS
-------- ------------------------------------------------------------ - -------
DR$LIB N VALID
DR$LIBX /emea/rdbms/32bit/app/oracle/product/9.2.0/lib/libctxx9.so Y VALID
-------------------------------------------------------------------------------
Additional configuration
------------------------
Oracle Text do NOT need configuration of external procedures (extproc), except
for one new document service function -- ctx_doc.ifilter, the on-demand
INSO filtering call. If you don't use this function, you DON'T need to set up
the listener and extproc. This configuration is not covered by this document.
For more information check
Steps to Deinstall Oracle Text Manually
----------------------------------------
Note: before deinstalling Oracle Text, it is best to first drop all
Text Indexes built in schemas other than CTXSYS.
------------------- cut here ------------------------------
connect CTXSYS/ctxsys
col comp_name for a30
set echo on
spool textdeinstall.log
start ?/ctx/admin/dr0drop.sql
drop public synonym catsearch;
drop public synonym context;
drop public synonym ctxcat;
drop public synonym ctxrule;
drop public synonym matches;
connect SYS/password as SYSDBA
Rem =======================================================================
Rem dba_registry removal
Rem =======================================================================
EXECUTE dbms_registry.removed('CONTEXT');
Rem =======================================================================
Rem now drop CTXSYS itself
Rem =======================================================================
start ?/ctx/admin/dr0dsys.sql
select comp_name, version, status from dba_registry;
spool off
exit;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-932285/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle全文檢索Oracle
- Oracle全文檢索之中文Oracle
- Oracle全文檢索之Ctxcat 索引Oracle索引
- Oracle全文檢索之ContextOracleContext
- oracle全文索引之配置全文檢索環境Oracle索引
- Oracle的全文檢索技術(轉)Oracle
- 全文檢索庫 bluge
- Oracle Text 學習筆記(11G)<一> :手工建立TEXTOracle筆記
- 個人部落格分享(Laravel + Vue 元件,支援全文檢索)LaravelVue元件
- Kibana 全文檢索操作
- solr全文檢索學習Solr
- 基於ElasticSearch實現商品的全文檢索檢索Elasticsearch
- elasticsearch的實現全文檢索Elasticsearch
- 請問全文檢索的思路?
- php + MongoDB + Sphinx 實現全文檢索PHPMongoDB
- 全文檢索技術lucene的demo
- 全文檢索的基本原理
- PostgreSQL全文檢索-詞頻統計SQL
- coreseek,php,mysql全文檢索部署(一)PHPMySql
- coreseek,php,mysql全文檢索部署(二)PHPMySql
- openGauss每日一練(全文檢索)
- 基於Lucene的全文檢索實踐
- ElasticSearch 實現分詞全文檢索 - 概述Elasticsearch分詞
- 全文字檢索的應用(2)(轉)
- 全文字檢索的應用(1)(轉)
- ORACLE TEXT DATASTORE PREFERENCE(一) 【ORACLE 全文索引】OracleAST索引
- IM全文檢索技術專題(四):微信iOS端的最新全文檢索技術優化實踐iOS優化
- PHP+redis實現超迷你全文檢索PHPRedis
- Linux Sphinx/Coreseek安裝 Mysql全文檢索LinuxMySql
- Lucene可以對MYSQL進行全文檢索嗎?MySql
- 【IT老齊072】全文檢索執行原理
- springboot ElasticSearch 簡單的全文檢索高亮Spring BootElasticsearch
- ElasticSearch 實現分詞全文檢索 - delete-by-queryElasticsearch分詞delete
- RDSforMySQL全文檢索相關問題的處理ORMMySql
- Mysql 如何實現全文檢索,關鍵詞跑分MySql
- 板橋大人,首頁的google全文檢索如何實現Go
- 全文檢索以及一些零散學習
- Oracle 手工建立資料庫Oracle資料庫