--搜到一篇手动安装的文章(9.2版本的) Manual Installation, Deinstallation of Oracle Text Release 9.2 [ID 275689.1] --------------------------------------------------------------------------------
修改时间 15-JUL-2011 类型 BULLETIN 状态 PUBLISHED ***Checked for relevance on 15-Jul-2011*** PURPOSE -------This document explains how to manually install and deinstall Oracle Text version 9.2.0.x SCOPE & APPLICATION -------------------This information may be of interest to Database Administrators and Support Analysts configuring Oracle9i Release 2 (9.2) for Text.Steps to Install Oracle Text Manually -------------------------------------
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/libSteps to Install Oracle Text Manually -------------------------------------
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/libInstallation script should look as follows : ============================================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_BASE\oradata\db_name\drsys01.dbf' SIZE 40m;REM ======================================================================== REM Install CTXSYS objects REM ======================================================================== connect CTXSYS/ctxsys start ?/ctx/admin/dr0inst /ctx/lib/libctxx9.so start ?/ctx/admin/defaults/drdefus.sqlREM ========================================================================= REM Upgrade CTXSYS to the latest patchset version, only required for >9.2.0.1 REM ========================================================================= connect SYS/password as SYSDBAstart ?/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 SYSDBAEXECUTE 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 /ctx/lib/libctxx9.soOn 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.soOn 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:\oracle\9.2.0 start ?\ctx\admin\dr0inst C:\oracle\9.2.0\bin\oractxx9.dll*** Note: The error ORA-01031: insufficient privileges while CTXSYS *** calls the dbms_registry package can be ignored, see BUG 2977268*** NOTE: If you install Text 9.2.0.1 manually the error *** ORA-01031, ORA-01403, ORA-06512 in "SYS.DBMS_REGISTRY" is thrown *** and can be solved while running following PL/SQL code as SYSDBAconnect SYS/password as SYSDBA declare ver varchar2(80); begin select ver_dict into ver from ctxsys.ctx_version; dbms_registry.loaded('CONTEXT', ver, 'Oracle Text Release '||ver||' - Production');
-- to do: a validation procedure dbms_registry.valid('CONTEXT'); end; /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.sql In above example we run US specific script start ?/ctx/admin/defaults/drdefus.sqlThen 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';spool off ------------------- cut here ------------------------------Example output of text_install_verification.log after valid installtion of 9.2.0.6.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.6.0
SQL> select * from ctxsys.ctx_version;
VER_DICT VER_CODE --------- --------------------------- 9.2.0.6.0 9.2.0.6.0SQL> select substr(ctxsys.dri_version,1,10) VER_CODE from dual;VER_CODE ------------------------------ 9.2.0.6.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 selectedSQL> 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 Note:73605.1 Installation of InterMedia Text version 8.1.x 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; ------------------- cut here ------------------------------Review the output file textdeinstall.log for errors. Deinstallation of Oracle Text 9.2.0.x is complete.
这个是在oracle 10.2.0.1.0-- Create the user create user CTXSYS identified by "" default tablespace SYSAUX temporary tablespace TEMP profile DEFAULT password expire account lock; -- Grant/Revoke role privileges grant ctxapp to CTXSYS with admin option; grant resource to CTXSYS; -- Grant/Revoke system privileges grant alter session to CTXSYS; grant create public synonym to CTXSYS; grant create session to CTXSYS; grant create synonym to CTXSYS; grant create view to CTXSYS; grant drop public synonym to CTXSYS; grant unlimited tablespace to CTXSYS;
找了下资料,已解决,备份如下:ORACLE10g 创建全文索引过程: 1,首先查看ORACLE是否已安装“全文检索工具” 通过查看是否存在 CTXSYS 用户,CTXAPP角色即可判断。 2,如果ORACLE没有安装“全文检索工具”,则使用以下步骤手工安装。 a)进入ORACLE安装目录 cd $ORACLE_HOME b)使用 DBA 角色登陆数据库 sqlplus sys/sys as sysdba c)查看表空间文件存放路径 select name from v$datafile; d)为 CTXSYS 用户创建表空间 CREATE TABLESPACE ctxsys LOGGING DATAFILE '/disk4/o10g/oradata/ctxsys01.dbf' SIZE 32m AUTOEXTEND ON NEXT 32m MAXSIZE 2048m EXTENT MANAGEMENT LOCAL ; e)创建 CTXSYS 用户,创建 CTXAPP 角色 @./ctx/admin/catctx.sql ctxsys ctxsys temp nolock --(密码、表空间、临时表空间、用户状态) --如果当前sql脚本无执行权限,请手工添加。 f)为 CTXSYS 执行初始化工作,如果没有此操作,后续操作会失败。 connect ctxsys/ctxsys; @./ctx/admin/defaults/drdefus.sql3,创建全文索引 a)创建词法分析器及相关表 --词法分析器 ctx_ddl.create_preference('offerProdAddrLexer','CHINESE_LEXER'); --词法 ctx_ddl.create_preference('offerProdAddrList', 'BASIC_WORDLIST'); ctx_ddl.set_attribute('offerProdAddrList','PREFIX_INDEX','TRUE'); ctx_ddl.set_attribute('offerProdAddrList','PREFIX_MIN_LENGTH',1); ctx_ddl.set_attribute('offerProdAddrList','PREFIX_MAX_LENGTH', 5); ctx_ddl.set_attribute('offerProdAddrList','SUBSTRING_INDEX', 'YES'); b)创建全文索引 create index IDX_OFFER_PROD_2_ADDRDESC on inst.OFFER_PROD_2_ADDR(ADDRESS_DESC) indextype is ctxsys.context parameters ('DATASTORE CTXSYS.DIRECT_DATASTORE FILTER CTXSYS.NULL_FILTER LEXER offerProdAddrLexer WORDLIST offerProdAddrList'); --创建索引的过程由数据量大小来决定。 c)同步全文索引 exec ctx_ddl.sync_index('IDX_OFFER_PROD_2_ADDR_AA_DESC', '20M'); --全文索引的同步需要使用JOB来进行
--搜到一篇手动安装的文章(9.2版本的)
Manual Installation, Deinstallation of Oracle Text Release 9.2 [ID 275689.1] --------------------------------------------------------------------------------
修改时间 15-JUL-2011 类型 BULLETIN 状态 PUBLISHED ***Checked for relevance on 15-Jul-2011***
PURPOSE
-------This document explains how to manually install and deinstall
Oracle Text version 9.2.0.x
SCOPE & APPLICATION
-------------------This information may be of interest to Database Administrators and
Support Analysts configuring Oracle9i Release 2 (9.2) for Text.Steps to Install Oracle Text Manually
-------------------------------------
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/libSteps to Install Oracle Text Manually
-------------------------------------
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/libInstallation script should look as follows :
============================================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_BASE\oradata\db_name\drsys01.dbf' SIZE 40m;REM ========================================================================
REM Install CTXSYS objects
REM ========================================================================
connect CTXSYS/ctxsys
start ?/ctx/admin/dr0inst /ctx/lib/libctxx9.so
start ?/ctx/admin/defaults/drdefus.sqlREM =========================================================================
REM Upgrade CTXSYS to the latest patchset version, only required for >9.2.0.1
REM =========================================================================
connect SYS/password as SYSDBAstart ?/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 SYSDBAEXECUTE 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 /ctx/lib/libctxx9.soOn 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.soOn 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:\oracle\9.2.0
start ?\ctx\admin\dr0inst C:\oracle\9.2.0\bin\oractxx9.dll*** Note: The error ORA-01031: insufficient privileges while CTXSYS
*** calls the dbms_registry package can be ignored, see BUG 2977268*** NOTE: If you install Text 9.2.0.1 manually the error
*** ORA-01031, ORA-01403, ORA-06512 in "SYS.DBMS_REGISTRY" is thrown
*** and can be solved while running following PL/SQL code as SYSDBAconnect SYS/password as SYSDBA
declare
ver varchar2(80);
begin
select ver_dict into ver from ctxsys.ctx_version;
dbms_registry.loaded('CONTEXT', ver,
'Oracle Text Release '||ver||' - Production');
-- to do: a validation procedure
dbms_registry.valid('CONTEXT');
end;
/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.sql
In above example we run US specific script
start ?/ctx/admin/defaults/drdefus.sqlThen 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';spool off
------------------- cut here ------------------------------Example output of text_install_verification.log after valid installtion of
9.2.0.6.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.6.0
SQL> select * from ctxsys.ctx_version;
VER_DICT VER_CODE
--------- ---------------------------
9.2.0.6.0 9.2.0.6.0SQL> select substr(ctxsys.dri_version,1,10) VER_CODE from dual;VER_CODE
------------------------------
9.2.0.6.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 selectedSQL> 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
Note:73605.1 Installation of InterMedia Text version 8.1.x
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;
------------------- cut here ------------------------------Review the output file textdeinstall.log for errors.
Deinstallation of Oracle Text 9.2.0.x is complete.
create user CTXSYS
identified by ""
default tablespace SYSAUX
temporary tablespace TEMP
profile DEFAULT
password expire
account lock;
-- Grant/Revoke role privileges
grant ctxapp to CTXSYS with admin option;
grant resource to CTXSYS;
-- Grant/Revoke system privileges
grant alter session to CTXSYS;
grant create public synonym to CTXSYS;
grant create session to CTXSYS;
grant create synonym to CTXSYS;
grant create view to CTXSYS;
grant drop public synonym to CTXSYS;
grant unlimited tablespace to CTXSYS;
1,首先查看ORACLE是否已安装“全文检索工具”
通过查看是否存在 CTXSYS 用户,CTXAPP角色即可判断。
2,如果ORACLE没有安装“全文检索工具”,则使用以下步骤手工安装。
a)进入ORACLE安装目录
cd $ORACLE_HOME
b)使用 DBA 角色登陆数据库
sqlplus sys/sys as sysdba
c)查看表空间文件存放路径
select name from v$datafile;
d)为 CTXSYS 用户创建表空间
CREATE TABLESPACE ctxsys
LOGGING
DATAFILE '/disk4/o10g/oradata/ctxsys01.dbf'
SIZE 32m
AUTOEXTEND ON
NEXT 32m MAXSIZE 2048m
EXTENT MANAGEMENT LOCAL ;
e)创建 CTXSYS 用户,创建 CTXAPP 角色
@./ctx/admin/catctx.sql ctxsys ctxsys temp nolock
--(密码、表空间、临时表空间、用户状态)
--如果当前sql脚本无执行权限,请手工添加。
f)为 CTXSYS 执行初始化工作,如果没有此操作,后续操作会失败。
connect ctxsys/ctxsys;
@./ctx/admin/defaults/drdefus.sql3,创建全文索引
a)创建词法分析器及相关表
--词法分析器
ctx_ddl.create_preference('offerProdAddrLexer','CHINESE_LEXER');
--词法
ctx_ddl.create_preference('offerProdAddrList', 'BASIC_WORDLIST');
ctx_ddl.set_attribute('offerProdAddrList','PREFIX_INDEX','TRUE');
ctx_ddl.set_attribute('offerProdAddrList','PREFIX_MIN_LENGTH',1);
ctx_ddl.set_attribute('offerProdAddrList','PREFIX_MAX_LENGTH', 5);
ctx_ddl.set_attribute('offerProdAddrList','SUBSTRING_INDEX', 'YES');
b)创建全文索引
create index IDX_OFFER_PROD_2_ADDRDESC on inst.OFFER_PROD_2_ADDR(ADDRESS_DESC)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.DIRECT_DATASTORE FILTER CTXSYS.NULL_FILTER LEXER offerProdAddrLexer WORDLIST offerProdAddrList');
--创建索引的过程由数据量大小来决定。
c)同步全文索引
exec ctx_ddl.sync_index('IDX_OFFER_PROD_2_ADDR_AA_DESC', '20M');
--全文索引的同步需要使用JOB来进行