1.目标:在数据库中,安装Oracle Text组件:
970473.1 MOS文档ID
2.组件相关视图:查询验证
#查询DB中的组件:
#视图:USER_REGISTRY (注册)
COMP_ID 组件标识
COMP_NAME 组件名称
VERSION 组件状态
STATUS VARCHAR2(11)
MODIFIED 组件上次修改的时间
NAMESPACE 组件名称空间
CONTROL 创建组件条目的用户
SCHEMA 包含组件对象的用户
PROCEDURE 验证程序
STARTUP 指示升级后组件是否需要启动(REEQUIRED需要)
PARENT_ID 父组件标识符
OTHER_SCHEMAS
#组件安装成功后:如下查询验证
SQL> select COMP_ID,COMP_NAME,VERSION,STATUS,SCHEMA from user_registry where comp_id='CONTEXT'; COMP_ID COMP_NAME VERSION STATUS SCHEMA ---------------------------------------------------------------------------------- CONTEXT Oracle Text 11.2.0.4.0 VALID CTXSYS
3.安装流程:
=>sys用户登录
=>执行脚本+ 参数【ctxsys用户密码、用户默认永久sysaux、临时表空间temp、创建后用户是否锁定nolock |lock】
=>创建支持的语言特性,英文
=>对安装组件进行检查
3.1. 创建数据字典、用户
Text dictionary, schema name CTXSYS, is created by calling following script from SQL*Plus connected as SYSDBA:
SQL> connect SYS/password as SYSDBA SQL> spool text_install.txt SQL> @?/ctx/admin/catctx.sql change_on_install SYSAUX TEMP NOLOCK
3.2创建支持的语言特训:英语
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.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.4.0
4.报错处理
4.1执行脚本前:spool,生成日志 spool /home/oracle/text_oinstall.text 4.2执行脚本:创建数据字典、用户报错 SQL> @?/ctx/admin/catctx.sql text_install sysaux temp nolock;
4.3:查询日志文件: /home/oracle/text_oinstall.text ...creating user CTXSYS create user ctxsys * ERROR at line 1: ORA-28003: password verification for the specified password failed ORA-20008: Password must contain at least one digit, one character 4.4分析报错:提示密码过于简单:概要文件参数指定,不满足密码 4.5:根据执行的脚本:查询CREATE USER操作 Rem CTXSYS.sql - schema creation amd granting privileges Rem ==================================================== @@ctxsys.sql &pass &tbs &ttbs &dolock create user ctxsys identified by &pass default tablespace &tbs temporary table space &ttbs; #根据:脚本的内容发现,密码为输入的第一个变量 4.6:查询数据库的概要文件:默认DEFAULT SQL> select count(*),PROFILE from dba_users group by profile; COUNT(*) PROFILE ---------- ------------------------------ 1 SHIXI 10 DEFAULT #查询概要文件的密码函数验证: SQL> select profile,resource_name,LIMIT from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_VERIFY_FUNCTION'; PROFILE RESOURCE_NAME LIMIT ------------------------------ -------------------------------- DEFAULT PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION #修改为NULL SQL> alter profile default limit Password_verify_function null; #实验成功后:还原概要文件中的密码函数验证 SQL> select profile,resource_name,LIMIT from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_VERIFY_FUNCTION'; PROFILE RESOURCE_NAME LIMIT ------------------------------ -------------------------------- DEFAULT PASSWORD_VERIFY_FUNCTION NULL