你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle 10g RAC 添加节点

[日期:2012-12-24] 来源:Linux社区  作者:staricqxyz [字体:大 中 小]

验证

SQL> select INSTANCE_NAME,HOST_NAME,VERSION,STARTUP_TIME,STATUS,ACTIVE_STATE,INSTANCE_ROLE,DATABASE_STATUS from gv$INSTANCE; 
 
INSTANCE_NAME    HOST_NAME  VERSION          STARTUP_TIME        STATUS      ACTIVE_ST INSTANCE_ROLE  DATABASE_STATUS 
---------------- ----------- ----------------- ----------------------- ------------ --------- ------------------ ----------------- 
racdb2      racnode2    10.2.0.5.0        20-DEC-2012 16:07:46    OPEN    NORMAL    PRIMARY_INSTANCE  ACTIVE 
racdb1      racnode1    10.2.0.5.0        20-DEC-2012 16:07:46    OPEN    NORMAL    PRIMARY_INSTANCE  ACTIVE 
racdb3      racnode3    10.2.0.5.0        24-DEC-2012 16:32:35    OPEN    NORMAL    PRIMARY_INSTANCE  ACTIVE 
 
SQL> exit 
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
[oracle@racnode2 ~]$ crs_stat -t -v 
Name          Type          R/RA  F/FT  Target    State    Host         
---------------------------------------------------------------------- 
ora.racdb.db  application    0/0    0/1    ONLINE    ONLINE    racnode1     
ora....b1.inst application    0/5    0/0    ONLINE    ONLINE    racnode1     
ora....b2.inst application    0/5    0/0    ONLINE    ONLINE    racnode2     
ora....b3.inst application    0/5    0/0    ONLINE    ONLINE    racnode3     
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    racnode1     
ora....E1.lsnr application    0/5    0/0    ONLINE    ONLINE    racnode1     
ora....de1.gsd application    0/5    0/0    ONLINE    ONLINE    racnode1     
ora....de1.ons application    0/3    0/0    ONLINE    ONLINE    racnode1     
ora....de1.vip application    0/0    0/0    ONLINE    ONLINE    racnode1     
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    racnode2     
ora....E2.lsnr application    0/5    0/0    ONLINE    ONLINE    racnode2     
ora....de2.gsd application    0/5    0/0    ONLINE    ONLINE    racnode2     
ora....de2.ons application    0/3    0/0    ONLINE    ONLINE    racnode2     
ora....de2.vip application    0/0    0/0    ONLINE    ONLINE    racnode2     
ora....SM3.asm application    0/5    0/0    ONLINE    ONLINE    racnode3     
ora....E3.lsnr application    0/5    0/0    ONLINE    ONLINE    racnode3     
ora....de3.gsd application    0/5    0/0    ONLINE    ONLINE    racnode3     
ora....de3.ons application    0/3    0/0    ONLINE    ONLINE    racnode3     
ora....de3.vip application    0/0    0/0    ONLINE    ONLINE    racnode3 

 

[oracle@racnode2 ~]$ sqlplus system@racdb1 
 
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Dec 24 16:39:26 2012 
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved. 
 
Enter password: 
 
Connected to: 
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
 
SQL> show parameter local_lis 
 
NAME                    TYPE    VALUE 
------------------------------------ ----------- ------------------------------ 
local_listener              string  (ADDRESS = (PROTOCOL = TCP)(HO 
                        ST = 192.168.1.151)(PORT = 152 
                        1)) 
SQL> exit 
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
[oracle@racnode2 ~]$ sqlplus system@racdb2 
 
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Dec 24 16:39:38 2012 
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved. 
 
Enter password: 
 
Connected to: 
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
 
SQL> show parameter local_lis 
 
NAME                    TYPE    VALUE 
------------------------------------ ----------- ------------------------------ 
local_listener              string  (ADDRESS = (PROTOCOL = TCP)(HO 
                        ST = 192.168.1.152)(PORT = 152 
                        1)) 
SQL> exit 
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
[oracle@racnode2 ~]$ sqlplus system@racdb3 
 
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Dec 24 16:39:47 2012 
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved. 
 
Enter password: 
 
Connected to: 
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
 
SQL> show parameter local_lis 
 
NAME                    TYPE    VALUE 
------------------------------------ ----------- ------------------------------ 
local_listener              string 
SQL> alter system set local_listener ='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.153)(PORT = 1521))' sid='racdb3'; 
 
System altered. 
 
SQL> show parameter local_lis 
 
NAME                    TYPE    VALUE 
------------------------------------ ----------- ------------------------------ 
local_listener              string  (ADDRESS = (PROTOCOL = TCP)(HO 
                        ST = 192.168.1.153)(PORT = 152 
                        1)) 
SQL> 

 

[oracle@racnode3 ~]$ lsnrctl status 
 
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 24-DEC-2012 16:42:41 
 
Copyright (c) 1991, 2010, Oracle.  All rights reserved. 
 
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) 
STATUS of the LISTENER 
------------------------ 
Alias                    LISTENER_RACNODE3 
Version                  TNSLSNR for Linux: Version 10.2.0.5.0 - Production 
Start Date                24-DEC-2012 16:33:03 
Uptime                    0 days 0 hr. 9 min. 37 sec 
Trace Level              off 
Security                  ON: Local OS Authentication 
SNMP                      OFF 
Listener Parameter File  /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora 
Listener Log File        /u01/app/oracle/product/10.2.0/db_1/network/log/listener_racnode3.log 
Listening Endpoints Summary... 
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.153)(PORT=1521))) 
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.53)(PORT=1521))) 
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) 
Services Summary... 
Service "+ASM" has 1 instance(s). 
  Instance "+ASM3", status BLOCKED, has 1 handler(s) for this service... 
Service "+ASM_XPT" has 1 instance(s). 
  Instance "+ASM3", status BLOCKED, has 1 handler(s) for this service... 
Service "racdb" has 3 instance(s). 
  Instance "racdb1", status READY, has 1 handler(s) for this service... 
  Instance "racdb2", status READY, has 1 handler(s) for this service... 
  Instance "racdb3", status READY, has 2 handler(s) for this service... 
Service "racdbXDB" has 3 instance(s). 
  Instance "racdb1", status READY, has 1 handler(s) for this service... 
  Instance "racdb2", status READY, has 1 handler(s) for this service... 
  Instance "racdb3", status READY, has 1 handler(s) for this service... 
Service "racdb_XPT" has 3 instance(s). 
  Instance "racdb1", status READY, has 1 handler(s) for this service... 
  Instance "racdb2", status READY, has 1 handler(s) for this service... 
  Instance "racdb3", status READY, has 2 handler(s) for this service... 
The command completed successfully 

 

[oracle@racnode3 ~]$ lsnrctl service 
 
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 24-DEC-2012 16:43:07 
 
Copyright (c) 1991, 2010, Oracle.  All rights reserved. 
 
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) 
Services Summary... 
Service "+ASM" has 1 instance(s). 
  Instance "+ASM3", status BLOCKED, has 1 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        LOCAL SERVER 
Service "+ASM_XPT" has 1 instance(s). 
  Instance "+ASM3", status BLOCKED, has 1 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        LOCAL SERVER 
Service "racdb" has 3 instance(s). 
  Instance "racdb1", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        REMOTE SERVER 
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.151)(PORT=1521)) 
  Instance "racdb2", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        REMOTE SERVER 
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.152)(PORT=1521)) 
  Instance "racdb3", status READY, has 2 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        REMOTE SERVER 
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.153)(PORT=1521)) 
      "DEDICATED" established:1 refused:0 state:ready 
        LOCAL SERVER 
Service "racdbXDB" has 3 instance(s). 
  Instance "racdb1", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "D000" established:0 refused:0 current:0 max:1022 state:ready 
        DISPATCHER <machine: racnode1, pid: 13625> 
        (ADDRESS=(PROTOCOL=tcp)(HOST=racnode1)(PORT=30569)) 
  Instance "racdb2", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "D000" established:0 refused:0 current:0 max:1022 state:ready 
        DISPATCHER <machine: racnode2, pid: 6359> 
        (ADDRESS=(PROTOCOL=tcp)(HOST=racnode2)(PORT=57869)) 
  Instance "racdb3", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "D000" established:0 refused:0 current:0 max:1022 state:ready 
        DISPATCHER <machine: racnode3, pid: 1929> 
        (ADDRESS=(PROTOCOL=tcp)(HOST=racnode3)(PORT=59281)) 
Service "racdb_XPT" has 3 instance(s). 
  Instance "racdb1", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        REMOTE SERVER 
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.151)(PORT=1521)) 
  Instance "racdb2", status READY, has 1 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        REMOTE SERVER 
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.152)(PORT=1521)) 
  Instance "racdb3", status READY, has 2 handler(s) for this service... 
    Handler(s): 
      "DEDICATED" established:0 refused:0 state:ready 
        REMOTE SERVER 
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.153)(PORT=1521)) 
      "DEDICATED" established:1 refused:0 state:ready 
        LOCAL SERVER 
The command completed successfully

 

[oracle@racnode3 ~]$ crsctl query crs activeversion 
CRS active version on the cluster is [10.2.0.5.0] 
[oracle@racnode3 ~]$ ocrcheck 
Status of Oracle Cluster Registry is as follows : 
    Version                  :          2 
    Total space (kbytes)    :    1469612 
    Used space (kbytes)      :      5384 
    Available space (kbytes) :    1464228 
    ID                      :  621085552 
    Device/File Name        : /dev/raw/raw1 
                                    Device/File integrity check succeeded 
    Device/File Name        : /dev/raw/raw2 
                                    Device/File integrity check succeeded 
 
    Cluster registry integrity check succeeded 
 
[oracle@racnode3 ~]$ crsctl query css votedisk 
 0.    0    /dev/raw/raw3 
 1.    0    /dev/raw/raw4 
 2.    0    /dev/raw/raw5 
 
located 3 votedisk(s). 

 

C:\>sqlplus system@rac3 
 
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 12月 24 16:44:50 2012 
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved. 
 
输入口令: 
 
连接到: 
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production 
With the Partitioning, Real Application Clusters, OLAP, Data Mining 
and Real Application Testing options 
 
SQL> show parameter instance_name 
 
NAME                                TYPE        VALUE 
------------------------------------ ----------- ------------------------------ 
instance_name                        string      racdb3 
SQL> set linesize 400 
SQL> col host_name format a11 
SQL> select INSTANCE_NAME,HOST_NAME,VERSION,STARTUP_TIME,STATUS,ACTIVE_STATE,INSTANCE_ROLE,DATABASE_STATUS from gv$INSTANCE; 
 
INSTANCE_NAME    HOST_NAME  VERSION          STARTUP_TIME  STATUS      ACTIVE_ST INSTANCE_ROLE  DATABASE_STATUS 
---------------- ----------- ----------------- -------------- ------------ --------- ------------------ ---------------- 
racdb3          racnode3    10.2.0.5.0        24-12月-12    OPEN        NORMAL    PRIMARY_INSTANCE  ACTIVE 
racdb2          racnode2    10.2.0.5.0        20-12月-12    OPEN        NORMAL    PRIMARY_INSTANCE  ACTIVE 
racdb1          racnode1    10.2.0.5.0        20-12月-12    OPEN        NORMAL    PRIMARY_INSTANCE  ACTIVE 

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款