首页 > 代码库 > RedHat EL5 安装Oracle 10g RAC之--建库

RedHat EL5 安装Oracle 10g RAC之--建库

RedHat EL5 安装Oracle 10g RAC之--建库

系统环境:

操作系统:RedHat EL5

Cluster: Oracle CRS 10.2.0.1.0

Oracle:  Oracle 10.2.0.1.0


如图所示:RAC 系统架构

wKioL1NqAeDQ-M09AAGvUOVml00157.jpg

四、通过DBCA建立数据库


1、首先通过DBCA配置ASM磁盘组

[oracle@node1 install]$dbca

wKiom1NqA2jgxPI1AANHhuD7tyA844.jpg

选择RAC环境建库

wKioL1NqA2GjsYicAAL6WnLV2qg009.jpg

选择ASM磁盘组管理

wKiom1NqBBbzGbloAAQzX2yu7mo295.jpg

创建ASM Instance ,注意选择用pfile ,易于管理

wKioL1NqBCPATNkzAAQfmtv5RzY517.jpg

创建ASM Instance

wKioL1NqBG3QMGgrAAQ_pMU_fVk999.jpg

提示:创建ASM Instance将创建listener

wKioL1NqBXKwCDTcAAN8iuzg_-A089.jpg

创建ASM DISKGROUP,dg1用于存储database,采用normal冗余,选择两个raw

wKiom1NqBXijROqCAANy_xIQ3gg321.jpg

创建ASM DISKGROUP,rcy1用于存储Recovery Area,采用normal冗余,选择两个raw


2、磁盘组创建完成后,开始建库

wKiom1NqBjTwaAhnAAK9JA2XvKU171.jpg

开始建库

wKiom1NqBlXwZrfPAAK4pIveD2Y386.jpg

注意选择所有node

wKioL1NqBk2w2k4vAANnpntEquw278.jpg

配置库名

wKiom1NqBp6zfWPYAAOv5nBWFDg829.jpg

存储介质,选择ASM

wKioL1NqBqCgYoo1AANbhRx7DhE883.jpg

DataBase存放在dg1 diskgroup

wKioL1NqBtuQkYJNAAPnp-SZ0N8985.jpg

Recovery Area 存放在rcy1 diskgroup

wKiom1NqBzbB6nCVAANndFdHlGU069.jpg

建库开始

wKiom1NqB2Dy4mGSAASLdW4Vdsc607.jpg

建库完成!


五、验证RAC

[root@node1 ~]# crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[root@node1 ~]# crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....SM1.asm application    ONLINE    ONLINE    node1      

ora....E1.lsnr application    ONLINE    ONLINE    node1      

ora.node1.gsd  application    ONLINE    ONLINE    node1      

ora.node1.ons  application    ONLINE    ONLINE    node1      

ora.node1.vip  application    ONLINE    ONLINE    node1      

ora....SM2.asm application    ONLINE    ONLINE    node2      

ora....E2.lsnr application    ONLINE    ONLINE    node2      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

ora.prod.db    application    ONLINE    ONLINE    node1      

ora....d1.inst application    ONLINE    ONLINE    node1      

ora....d2.inst application    ONLINE    ONLINE    node2      

[root@node1 ~]#

[root@node2 ~]# crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[root@node2 ~]# crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....SM1.asm application    ONLINE    ONLINE    node1      

ora....E1.lsnr application    ONLINE    ONLINE    node1      

ora.node1.gsd  application    ONLINE    ONLINE    node1      

ora.node1.ons  application    ONLINE    ONLINE    node1      

ora.node1.vip  application    ONLINE    ONLINE    node1      

ora....SM2.asm application    ONLINE    ONLINE    node2      

ora....E2.lsnr application    ONLINE    ONLINE    node2      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

ora.prod.db    application    ONLINE    ONLINE    node1      

ora....d1.inst application    ONLINE    ONLINE    node1      

ora....d2.inst application    ONLINE    ONLINE    node2      


SQL> select instance_name,status from gv$instance;


INSTANCE_NAME    STATUS

---------------- ------------

prod2            OPEN

prod1            OPEN


附:错误案例


安装完成后Oracle用户执行srvctl出现以下错误:

[oracle@node2 ~]$ srvctl stop database -d prod

/u01/app/oracle/product/10.2.0/db_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

[oracle@node2 ~]$ cd $ORACLE_HOME/bin(注意是Oracle软件主目录)

[oracle@node2 bin]$ vi srvctl

#Remove this workaround when the bug 3937317 is fixed

LD_ASSUME_KERNEL=2.4.19

export LD_ASSUME_KERNEL

unset LD_ASSUME_KERNEL (在文件中添加此行信息)

--问题解决!


@至此在RedHat EL5下安装Oracle 10g RAC的工作告一段落,对RAC的管理和维护还任重而道远!





本文出自 “天涯客的blog” 博客,请务必保留此出处http://tiany.blog.51cto.com/513694/1408063