ORACLE TEXT安裝與解除安裝
1.建立CTXSYS使用者
以SYS使用者執行以下指令碼:
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 – 設定ctxsys使用者密碼
SYSAUX – 調置ctxsys使用者預設表空間
TEMP – 設定ctxsys使用者預設臨時表空間
LOCK|NOLOCK – 設定ctxsys使用者鎖定與不鎖定
2.指定預設安裝語言
SYS@jzh>conn ctxsys/oracle
Connected.
以ctxsys使用者執行如下指令碼:
CTXSYS@jzh>@$ORACLE_HOME/ctx/admin/defaults/drdefus.sql
Creating lexer preference...
PL/SQL procedure successfully completed.
Creating wordlist preference...
PL/SQL procedure successfully completed.
Creating stoplist...
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Creating default policy...
PL/SQL procedure successfully completed.
在11.2.0.3版本中,如果不執行以上指令碼,那麼在執行指令碼dr0defin.sql或建立索引時會遇到如下錯誤:
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 1140
ORA-06512: at line 2
SQL> CREATE INDEX "EXPERIAN2"."IX_COMP_SEARCH"
ON "EBA05M5" ("COMPANY_NAME") INDEXTYPE IS "CTXSYS"."CONTEXT";
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at CTXSYS.DRUE, line 160
ORA-06512: at CTXSYS.TEXTINDEXMETHODS, line 364
設定american為預設語言
SYS@jzh>@?/ctx/admin/defaults/dr0defin.sql "AMERICAN";
old 1: SELECT DECODE('&nls_language',
new 1: SELECT DECODE('AMERICAN',
LA
--
us
Creating lexer preference...
PL/SQL procedure successfully completed.
Creating wordlist preference...
PL/SQL procedure successfully completed.
Creating stoplist...
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Creating default policy...
PL/SQL procedure successfully completed.
注意:在一些系統中使用text必須指定相關變數,如下列表:
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
Run the following command to check if the LD_LIBRARY_PATH environmental variable is set correctly:
$ echo $LD_LIBRARY_PATH
3. 驗證
以sys使用者登陸資料庫執行如下指令碼:
SYS@jzh>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
SYS@jzh>select * from ctxsys.ctx_version;
VER_DICT VER_CODE
---------------------------------------- ----------------------------------------
11.2.0.3.0 11.2.0.3.0
SYS@jzh>select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
VER_CODE
----------------------------------------
11.2.0.3.0
SYS@jzh>select count(*) from dba_objects where owner='CTXSYS';
COUNT(*)
----------
388
SYS@jzh>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
OBJECT_TYPE COUNT(*)
------------------- ----------
TYPE 35
TYPE BODY 6
VIEW 77
14 rows selected.
SYS@jzh>select object_name, object_type, status from dba_objects where owner='CTXSYS' and status != 'VALID' order by object_name;
no rows selected
如果有無效物件,可手動重新編譯。
4. 解除安裝Oracle text
? 以sys使用者執行如下指令碼
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
以SYS使用者執行以下指令碼:
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 – 設定ctxsys使用者密碼
SYSAUX – 調置ctxsys使用者預設表空間
TEMP – 設定ctxsys使用者預設臨時表空間
LOCK|NOLOCK – 設定ctxsys使用者鎖定與不鎖定
2.指定預設安裝語言
SYS@jzh>conn ctxsys/oracle
Connected.
以ctxsys使用者執行如下指令碼:
CTXSYS@jzh>@$ORACLE_HOME/ctx/admin/defaults/drdefus.sql
Creating lexer preference...
PL/SQL procedure successfully completed.
Creating wordlist preference...
PL/SQL procedure successfully completed.
Creating stoplist...
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Creating default policy...
PL/SQL procedure successfully completed.
在11.2.0.3版本中,如果不執行以上指令碼,那麼在執行指令碼dr0defin.sql或建立索引時會遇到如下錯誤:
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 1140
ORA-06512: at line 2
SQL> CREATE INDEX "EXPERIAN2"."IX_COMP_SEARCH"
ON "EBA05M5" ("COMPANY_NAME") INDEXTYPE IS "CTXSYS"."CONTEXT";
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at CTXSYS.DRUE, line 160
ORA-06512: at CTXSYS.TEXTINDEXMETHODS, line 364
設定american為預設語言
SYS@jzh>@?/ctx/admin/defaults/dr0defin.sql "AMERICAN";
old 1: SELECT DECODE('&nls_language',
new 1: SELECT DECODE('AMERICAN',
LA
--
us
Creating lexer preference...
PL/SQL procedure successfully completed.
Creating wordlist preference...
PL/SQL procedure successfully completed.
Creating stoplist...
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Creating default policy...
PL/SQL procedure successfully completed.
注意:在一些系統中使用text必須指定相關變數,如下列表:
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
Run the following command to check if the LD_LIBRARY_PATH environmental variable is set correctly:
$ echo $LD_LIBRARY_PATH
3. 驗證
以sys使用者登陸資料庫執行如下指令碼:
SYS@jzh>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
SYS@jzh>select * from ctxsys.ctx_version;
VER_DICT VER_CODE
---------------------------------------- ----------------------------------------
11.2.0.3.0 11.2.0.3.0
SYS@jzh>select substr(ctxsys.dri_version,1,10) VER_CODE from dual;
VER_CODE
----------------------------------------
11.2.0.3.0
SYS@jzh>select count(*) from dba_objects where owner='CTXSYS';
COUNT(*)
----------
388
SYS@jzh>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
OBJECT_TYPE COUNT(*)
------------------- ----------
TYPE 35
TYPE BODY 6
VIEW 77
14 rows selected.
SYS@jzh>select object_name, object_type, status from dba_objects where owner='CTXSYS' and status != 'VALID' order by object_name;
no rows selected
如果有無效物件,可手動重新編譯。
4. 解除安裝Oracle text
? 以sys使用者執行如下指令碼
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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-2128570/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 19c 安裝、解除安裝Oracle
- Mac Redis安裝與解除安裝MacRedis
- JDK的安裝與解除安裝JDK
- Mysql安裝解除安裝與啟停MySql
- rpm包安裝升級與解除安裝
- Oracle11g解除安裝Oracle
- app的安裝與解除安裝測試點APP
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- Linux安裝解除安裝MySQLLinuxMySql
- Ubuntu解除安裝和安裝Ubuntu
- cocoapods安裝/解除安裝/使用
- JDK安裝和解除安裝JDK
- docker安裝及解除安裝Docker
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- debian安裝和解除安裝vmware
- linux 解除安裝jdk和安裝LinuxJDK
- [雲原生]Docker - 安裝&解除安裝Docker
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- window下安裝並使用nvm(含解除安裝node、解除安裝nvm、全域性安裝npm)NPM
- Oracle RAC叢集解除安裝步驟Oracle
- MySQL:mysql5.7解壓版安裝與解除安裝MySql
- air安裝win10怎麼解除安裝_air安裝win10如何解除安裝AIWin10
- Centos Docker安裝、升級、解除安裝CentOSDocker
- Linux-Ubuntu-mysql-安裝&解除安裝LinuxUbuntuMySql
- Centos7.9安裝解除安裝DockerCentOSDocker
- Python pip的安裝及解除安裝Python
- vs2015解除安裝和安裝
- docker 解除安裝Docker
- 解除安裝 PythonPython
- WSL解除安裝
- debian軟體解除安裝|deb包解除安裝|dpkg命令
- 如何安裝與解除安裝鐵威馬NAS應用程式
- linux磁碟掛載與解除安裝Linux
- Ubuntu解除安裝及安裝node和npmUbuntuNPM
- 解除安裝windows安裝ubuntu的完全指南WindowsUbuntu
- clickhouse學習(1)-clickhouse安裝解除安裝
- 斐訊N1の折騰 - Docker安裝與解除安裝Docker
- Redis(windows)解除安裝RedisWindows
- docker的解除安裝Docker