HP下Oracle快照代理的安装、卸载和配置
一 组网需求:
无
二 组网图:
无
三 配置步骤:
操作系统要求
Oracle8i
HP-UX B.11.00以及HP-UX B.11.11
Oracle9i
HP-UX B.11.00、HP-UX B.11.11以及HP-UX 11i v2(Itanium平台)
Oracle10g
HP-UX B.11.11
其他要求
(1)安装SAN Client,并且已在分配的设备上创建了数据库。
注意:
需要确认日志文件、数据文件以及控制文件都存放在IV5000分配的设备上。
(2)确认当前SID以及登陆密码。
(3)确认SAN Client以及Oracle已启动。
(4)确认数据库的版本号,以及是32位还是64位。主要有以下几种方法:
通过SQLPLUS登录即可看出
64位登陆时有显示:
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Wed Nov 16 15:27:28 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
32位登陆时无显示:
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Wed Nov 16 15:19:03 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
从v$version获取
SQL> select * from v$version;
BANNER
------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for 32-bit Windows: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production
使用系统命令file
如果输出带有32-bit字样为32位Oracle
$ file $ORACLE_HOME/bin/oracle
/opt/oracle/product/9.2.0/bin/oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386..
如果输出带有64-bit字样为64位Oracle
$ file $ORACLE_HOME/bin/oracle
/opt/oracle/product/9.2.0/bin/oracle: ELF 64-bit MSB executable SPARCV9 Version 1 ..
打开Oracle的归档模式
在运行快照代理之前必须打开Oracle的归档模式。如果Oracle的归档模式未打开,可以按照以下操作进行:
在initSID.ora文件中添加以下三行:
log_archive_start = true --指明在数据库启动之后,是否自动启动归档
log_archive_dest = /mount_point/oradata/SID/ARCHIVE/ --指明归档重做日志文件的默认存放路径
log_archive_format = _%s.arc --指明归档重做日志文件的默认文件名格式,%s是日志序列号
因此当一个重做日志文件被归档,Oracle将会利用log_archive_dest和log_archive_format的值的组合来生成归档日志文件和存放路径。
例如:/mount_point/oradata/SID/ARCHIVE/arch_1234.arc
在重启数据库之前,请确认已经创建了/mount_point/oradata/SID/ARCHIVE目录。
注意:
所作的这些更改在Oracle重新启动才能生效。
在数据库关闭时,利用DBA工具(例如sqlplus)来手动启动数据库并执行以下命令
startup mount exclusive pfile=<path to pfile>
connect internal
alter database archivelog;
archive log start;
alter database open;
把root用户添加到数据库组中
root用户是触发代理的用户,需要把root用户添加到数据库组中。编辑/etc/group文件,把root用户到每个组中。如下所示:
system:!:0:root
sys:!:3:root,bin,sys
……
oinstall:!:206:root
dba:!:207:oracle,root
安装Oracle快照代理
说明:
IV5000提供了针对Oracle8i、Oracle9i、Oracle10g的快照代理,针对不同版本的快照代理的安装是类似的,因此下面的安装和配置过程不区分具体的版本。
确保客户端要使用的IV5000已正常运行;
以root用户登录系统,SAN客户端软件正常运行;
将快照代理的安装包上传到服务器的临时目录上(如/tmp);
执行以下命令解压缩快照代理软件:
cd /tmp
tar –xvf <oracleversionagent>-<version number>-<build number>.generic.tar
例如:tar –xvf oracle9iagent-4.50-904.generic.tar
执行以下命令安装快照代理软件:
# cd gen_pkg
# swinstall -s ‘pwd’
快照代理软件安装到/usr/local/sanclient/agents/oracle。
配置Oracle快照代理
说明:
运行ora_setup.sh时,不同的Oracle版本,输入的参数可能会不同。请根据Oracle是64位还是32为输入正确的路径。
执行以下命令配置Oracle快照代理:
cd /usr/local/sanclient/agents/oracle/bin
./ ora_setup.sh
Please enter the Oracle lib path:--Oracle环境变量的SHLIB_PATH(如果有多个,用冒号来分隔)
注意:
如果数据库是64位的,需要输入path为<ORACLE_HOME>/lib32。
Is Oracle started? --Oracle必须是打开的.
What is the Oracle home path? -- ORACLE_HOME环境变量
Enter the Oracle SID:--为了开启Oracle日志存档功能,安装程序需要知道Oracle实例的名字(ORACLE_SID环境变量)
What is the Oracle admin user id for SID xxx? (system) --访问Oracle数据库的管理员ID
What is the Oracle admin password for SID xxx? (manager) --管理员对应的密码
What is the login name of the UNIX user account that owns Oracle software?(oracle) --
Would you like to enter user id and password for anther Oracle SID? –是否需要配置更多的Oracle实例
检查修改的文件
一旦Oracle快照代理配置成功,会创建配置文件/usr/local/sanclient /agents/oracle/etc/oracle.conf,并且更新/usr/local/sanclient/etc/isdb.conf.
注意:
如果配置过程出错时,需要在/etc/.is.sh文件中去掉出错的参数,并且重新运行ora_setup.sh。
验证Oracle快照代理
在IV5000控制台上为分配给HP-UX客户端的SAN资源启用存储选项,
注意:
根据IV5000所配置的License进行选择,可包括TimeMark、复制和快照拷贝。
在快照资源属性中勾选“快照通知”选项。
在IV5000上执行相关操作触发Oracle快照代理。
察看Oralce的LOG信息,确认数据库是否曾进入备份模式。
卸载Oracle快照代理
以root用户登录系统;
执行以下命令卸载快照代理:
# swremove
四 配置关键点:
略
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作