部署Oracle 11.2.0.3 RAC (二)

一:开始安装数据库软件之前,需要先确定先前安装好的grid infrastructure是否正常

[grid@node1 ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host       
----------------------------------------------------------------------
ora.CRS.dg     ora....up.type 0/5    0/     ONLINE    ONLINE    node1      
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    node1      
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    node2      
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    node1      
ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    node2      
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE              
ora....network ora....rk.type 2/5    0/     ONLINE    ONLINE    node1      
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    node1      
ora....E1.lsnr application    0/5    0/0    ONLINE    ONLINE    node1      
ora.node1.gsd  application    0/5    0/0    OFFLINE   OFFLINE              
ora.node1.ons  application    0/3    0/0    ONLINE    ONLINE    node1      
ora.node1.vip  ora....t1.type 0/0    0/0    ONLINE    ONLINE    node1      
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    node2      
ora....E2.lsnr application    0/5    0/0    ONLINE    ONLINE    node2      
ora.node2.gsd  application    0/5    0/0    OFFLINE   OFFLINE              
ora.node2.ons  application    0/3    0/0    ONLINE    ONLINE    node2      
ora.node2.vip  ora....t1.type 0/0    0/0    ONLINE    ONLINE    node2      
ora.oc4j       ora.oc4j.type  0/1    0/2    ONLINE    ONLINE    node1      
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    node1      
ora....ry.acfs ora....fs.type 0/5    0/     ONLINE    ONLINE    node1      
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    node2     

[grid@node1 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[grid@node1 ~]$ olsnodes -n
node1   1
node2   2

[grid@node1 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   ae63de1fb2ae4fc8bf67d9b132ec65d5 (ORCL:CRS2) [CRS]
 2. ONLINE   064d6bc958814fe8bf29c7301ae7b40d (ORCL:CRS1) [CRS]
 3. ONLINE   6d499c6f22a14f41bff437487c6dc2f1 (ORCL:CRS3) [CRS]
Located 3 voting disk(s).

[root@node1 ~]# ip a show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 52:54:00:69:e8:f7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.51/24 brd 192.168.1.255 scope global eth0
    inet 192.168.1.151/24 brd 192.168.1.255 scope global secondary eth0:2
    inet6 fe80::5054:ff:fe69:e8f7/64 scope link
       valid_lft forever preferred_lft forever

[root@node2 ~]# ip a show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 52:54:00:be:bc:58 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.52/24 brd 192.168.1.255 scope global eth0
    inet 192.168.1.50/24 brd 192.168.1.255 scope global secondary eth0:1
    inet 192.168.1.152/24 brd 192.168.1.255 scope global secondary eth0:2
    inet6 fe80::5054:ff:febe:bc58/64 scope link
       valid_lft forever preferred_lft forever

二:新建2个ASM磁盘组,DATA和FRA
[grid@node1 ~]$ asmca

 三:安装数据库软件
[root@node1 ~]# su - oracle
[oracle@node1 ~]$ cd database/
[oracle@node1 database]$ ./runInstaller

 

 

 

 

 

 

 

 

 

在rac各个节点上以root用户身份运行下面的脚本

 

四:创建数据库
[oracle@node1 ~]$ dbca

 

 

 

 

 

 

 

 

 

五:连接集群数据库

[root@node1 ~]# su - oracle
[oracle@node1 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Sun Jan 22 22:20:16 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
SQL> conn /as sysdba
Connected.

SQL> select name,open_mode from gv$database;

NAME      OPEN_MODE
--------- --------------------
NODE      READ WRITE
NODE      READ WRITE

SQL> select host_name,instance_name,thread#,status,archiver from gv$instance;

HOST_NAME            INSTANCE_NAME       THREAD# STATUS       ARCHIVE
-------------------- ---------------- ---------- ------------ -------
node1.yang.com       node1                     1 OPEN         STARTED
node2.yang.com       node2                     2 OPEN         STARTED

[oracle@node1 ~]$ sqlplus sys/Ab123456@192.168.1.50:1521/node.yang.com as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Jan 22 23:17:14 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> show user;
USER is "SYS"
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   1
Current log sequence           1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值