文档6、创建Oracle资源组
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
青州码头小型机项目实施方案
(Solaris 10 U7 + Oracle 10g + ZFS + Sun Cluster 3.2 U2)
文档六、创建Oracle双机软件资源组
一、创建Oracle双机软件使用的监听用户
在节点1启动数据库
使用oracle用户telnet登陆节点1主机,运行以下命令:
$lsnrctl start
$sqlplus /nolog
SQL>conn / as sysdba
SQL>startup
SQL>create user ora_monitor identified by ORA_MONITOR default tablespace system quota 1m on system;
SQL>grant connect, resource to ora_monitor;
SQL>grant select on v_$sysstat to ora_monitor;
SQL>grant select on v_$archive_dest to ora_monitor;
SQL>grant create session to ora_monitor;
SQL>grant create table to ora_monitor;
创建完成后可以关闭数据库了。
SQL>shutdown immediate
SQL>quit
二、在两个节点上修改Oracle监听配置文件
修改/u01/oracle/product/10.2.0/network/admin/tnsnames.ora文件如下:
# tnsnames.ora Network Configuration File:
/u01/oracle/product/10.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORA10G =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = fqoradb)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora10g)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
修改/u01/oracle/product/10.2.0/network/admin/listener.ora文件内容如下:
# listener.ora Network Configuration File:
/u01/oracle/product/10.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = fqoradb)(PORT = 1521)) )
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle/product/10.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = ora10g)
(ORACLE_HOME = /u01/oracle/product/10.2.0)
(GLOBAL_DBNAME = ora10g)
)
)
二、在两个节点安装Sun Cluster HA for Oracle
挂载Cluster光盘镜像,使用root用户telnet登陆主机,使用以下命令安装:
#lofiadm –a /iso/SC_32U2_DVD.iso /dev/lofi/1
#mount –F hsfs /dev/lofi/1 /mnt
开始运行安装程序
#cd /mnt/Solaris_sparc
#./Installer
选择“2.以后再配置”后开始安装到完成。
三、创建Oracle故障转移资源组
使用root用户telnet登陆节点1主机,使用以下命令创建资源组:clresourcegroup create oracle-rg
clreslogicalhostname create -g oracle-rg fqoradb
clresourcetype register SUNW.HAStoragePlus
clresource create -g oracle-rg -t SUNW.HAStoragePlus \
-p Zpools=orapool \
-p AffinityOn=TRUE oracle-hastorageplus
clresourcetype register SUNW.oracle_server
clresourcetype register SUNW.oracle_listener
clresource create -g oracle-rg \
-t SUNW.oracle_server -p ORACLE_HOME=/u01/oracle/product/10.2.0 \ -p Alert_log_file=/u01/oracle/admin/ora10g/bdump/alert_ora10g.log \ -p ORACLE_SID=ora10g -p Connect_string=ora_monitor/ORA_MONITOR \ oracle-server
clresource create -g oracle-rg \