- <span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">因项目需要,所以要在原本只安装jvm组件的oracle数据库,添加组件xml db和oracle text!</span>
xml db的安装请参考http://blog.csdn.net/xionglang7/article/details/38034555
dbca创建是默认会创建这两个组件的。
设置环境变量
Platform: Requires path set: ENV variable:
--------------------- --------------------- -------------------
Linux x86-64 YES LD_LIBRARY_PATH
Solaris SPARC64 YES LD_LIBRARY_PATH
IBM AIX YES LIBPATH
HP PA-RISC YES SHLIB_PATH
HP Itanium YES LD_LIBRARY_PATH
例如:
- If you have the C Shell (csh or tcsh), enter the following:
$ setenv LD_LIBRARY_PATH $ORACLE_HOME/ctx/lib:$LD_LIBRARY_PATH
- If you have the Bourne shell (sh), Bash shell (bash), or Korn shell (ksh), enter the following:
$ export LD_LIBRARY_PATH=$ORACLE_HOME/ctx/lib:$LD_LIBRARY_PATH
1,创建数据字典,用户等
- SQL> connect SYS/password as SYSDBA
- SQL> spool text_install.txt
- SQL> @?/ctx/admin/catctx.sql change_on_install SYSAUX TEMP NOLOCK
change_on_install - is the ctxsys user password
SYSAUX - is the default tablespace for ctxsys
TEMP - is the temporary tablespace for ctxsys
LOCK|NOLOCK - ctxsys user account will be locked or no
2,创建支持的语言特性,一般都选择英文
There is script which creates language-specific default preferences for every language Oracle Text supports in $O_H/ctx/admin/defaults directory, such as English(US), Danish(DK), Dutch(NL), Finnish(SF), French(F), German(D), Italian(IT), Portuguese(PT), Spanish(E), and Swedish(S). They are named in the form drdefXX.sql, where XX is the international license plate code.
- SQL> connect "CTXSYS"/"change_on_install"
- SQL> @?/ctx/admin/defaults/dr0defin.sql "AMERICAN";
- SQL> connect SYS/password as SYSDBA
- SQL> alter user ctxsys account lock password expire;
- SQL> spool off
3,对安装组件进行检查
各个版本显示结果不同
11.2.0.1显示结果:
- 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 11.2.0.1.0
- SQL> select * from ctxsys.ctx_version;
- VER_DICT VER_CODE
- ---------- ----------
- 11.2.0.1.0 11.2.0.1.0
- SQL> select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
- VER_CODE
- ----------
- 11.2.0.1.0
- SQL> select count(*) from dba_objects where owner='CTXSYS';
- COUNT(*)
- ----------
- 366
- SQL>
- SQL> -- Get a summary count
- SQL> select object_type, count(*) from dba_objects where owner='CTXSYS' group by object_type;
- OBJECT_TYPE COUNT(*)
- ------------------- ----------
- SEQUENCE 3
- PROCEDURE 2
- OPERATOR 6
- PACKAGE 73
- PACKAGE BODY 62
- LIBRARY 1
- LOB 2
- TYPE BODY 6
- VIEW 71
- INDEXTYPE 4
- FUNCTION 2
- TABLE 47
- INDEX 56
- TYPE 31
- SQL>
- SQL> -- Any invalid objects
- SQL> select object_name, object_type, status from dba_objects where owner='CTXSYS' and status != 'VALID' order by object_name;
- no rows selected
- SQL>
11.2.0.2显示结果
- 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 11.2.0.2.0
- SQL> select * from ctxsys.ctx_version;
- VER_DICT VER_CODE
- ---------- ----------
- 11.2.0.2.0 11.2.0.2.0
- SQL> select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
- VER_CODE
- ----------
- 11.2.0.2.0
- SQL> select count(*) from dba_objects where owner='CTXSYS';
- COUNT(*)
- ----------
- 382
- SQL>
- SQL> -- Get a summary count
- SQL> select object_type, count(*) from dba_objects where owner='CTXSYS' group by object_type;
- OBJECT_TYPE COUNT(*)
- ------------------- ----------
- SEQUENCE 3
- PROCEDURE 2
- OPERATOR 6
- LOB 2
- LIBRARY 1
- PACKAGE 74
- PACKAGE BODY 63
- TYPE BODY 6
- TABLE 49
- INDEX 59
- VIEW 76
- FUNCTION 2
- INDEXTYPE 4
- TYPE 35
- SQL>
- SQL> -- Any invalid objects
- SQL> select object_name, object_type, status from dba_objects where owner='CTXSYS' and status != 'VALID' order by object_name;
- no rows selected
- SQL>
11.2.0.3显示结果
- 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 11.2.0.3.0
- SQL> select * from ctxsys.ctx_version;
- VER_DICT VER_CODE
- ----------- -----------
- 11.2.0.3.0 11.2.0.3.0
- SQL> select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
- VER_CODE
- ----------
- 11.2.0.3.0
- SQL> select count(*) from dba_objects where owner='CTXSYS';
- COUNT(*)
- ----------
- 388
- SQL> select object_type, count(*) from dba_objects where owner='CTXSYS' group by object_type order by 1;
- OBJECT_TYPE COUNT(*)
- ------------------- ----------
- FUNCTION 2
- INDEX 63
- INDEXTYPE 4
- LIBRARY 1
- LOB 2
- OPERATOR 6
- PACKAGE 74
- PACKAGE BODY 63
- PROCEDURE 2
- SEQUENCE 3
- TABLE 50
- TYPE 35
- TYPE BODY 6
- VIEW 77
- 14 rows selected.
- SQL>
- SQL> -- Any invalid objects
- SQL> select object_name, object_type, status from dba_objects where owner='CTXSYS' and status != 'VALID' order by object_name;
- no rows selected
- SQL>
- SQL> connect SYS/password as SYSDBA
- SQL> spool text_deinstall.log
- SQL> @?/ctx/admin/catnoctx.sql
- SQL> drop procedure sys.validate_context;
- SQL> spool off
原文地址:http://blog.csdn.net/xionglang7/article/details/39497109