oracle数据库修改11.2 RAC 的 SCAN IP的例子

在某些情况下,由于是C/S架构,从以前的单机系统迁移到现在11.2的rac中,如果修改客户端ip地址工作量太大,而且也不现实,一般建议直接修改scan ip地址和以前一样,从而实现业务直接访问scan ip实现应用不用一个个单独配置.这里通过简单演示,实现修改scan ip的过程(网段不变),主要是把scan名字为scan-xff的ip地址从192.168.137.245修改为192.168.137.248
查看当前scan ip信息
[root-www.111cn.net@xff1 ~]# ping xff-scan
PING xff-scan (192.168.137.245) 56(84) bytes of data.
^C
--- xff-scan ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1738ms
[root-www.111cn.net@xff1 ~]# crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.asm
               ONLINE  ONLINE       xff1                     Started            
               ONLINE  ONLINE       xff2                     Started            
ora.gsd
               OFFLINE OFFLINE      xff1                                        
               OFFLINE OFFLINE      xff2                                        
ora.net1.network
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.ons
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       xff1                                        
ora.cvu
      1        ONLINE  ONLINE       xff1                                        
ora.oc4j
      1        ONLINE  ONLINE       xff1                                        
ora.scan1.vip
      1        ONLINE  ONLINE       xff1                                        
ora.xff1.vip
      1        ONLINE  ONLINE       xff1                                        
ora.xff2.vip
      1        ONLINE  ONLINE       xff2                                        
ora.xffdb.db
      1        ONLINE  ONLINE       xff1                     Open               
      2        ONLINE  ONLINE       xff2                     Open  
[root-www.111cn.net@xff1 ~]# srvctl config scan
SCAN name: xff-scan, Network: 1/192.168.137.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /xff-scan/192.168.137.245
修改scan ip
[root-www.111cn.net@xff1 ~]# srvctl stop scan_listener
[root-www.111cn.net@xff1 ~]# srvctl stop scan
[root-www.111cn.net@xff1 ~]# crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.asm
               ONLINE  ONLINE       xff1                     Started            
               ONLINE  ONLINE       xff2                     Started            
ora.gsd
               OFFLINE OFFLINE      xff1                                        
               OFFLINE OFFLINE      xff2                                        
ora.net1.network
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.ons
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                                                  
ora.cvu
      1        ONLINE  ONLINE       xff1                                        
ora.oc4j
      1        ONLINE  ONLINE       xff1                                        
ora.scan1.vip
      1        OFFLINE OFFLINE                                                  
ora.xff1.vip
      1        ONLINE  ONLINE       xff1                                        
ora.xff2.vip
      1        ONLINE  ONLINE       xff2                                        
ora.xffdb.db
      1        ONLINE  ONLINE       xff1                     Open               
      2        ONLINE  ONLINE       xff2                     Open
 
--如果是dns,注意修改dns中scan ip信息,如果是hosts文件注意多个节点都需要修改
[root-www.111cn.net@xff1 ~]# ping xff-scan
PING xff-scan (192.168.137.248) 56(84) bytes of data.
^C
--- xff-scan ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1738ms
 
[root-www.111cn.net@xff1 ~]# srvctl modify scan -n xff-scan
[root-www.111cn.net@xff1 ~]# srvctl config scan
SCAN name: xff-scan, Network: 1/192.168.137.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /xff-scan/192.168.137.248
[root-www.111cn.net@xff1 ~]# srvctl start scan
[root-www.111cn.net@xff1 ~]# srvctl start scan_listener
[root-www.111cn.net@xff1 ~]# crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.asm
               ONLINE  ONLINE       xff1                     Started            
               ONLINE  ONLINE       xff2                     Started            
ora.gsd
               OFFLINE OFFLINE      xff1                                        
               OFFLINE OFFLINE      xff2                                        
ora.net1.network
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
ora.ons
               ONLINE  ONLINE       xff1                                        
               ONLINE  ONLINE       xff2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       xff2                                        
ora.cvu
      1        ONLINE  ONLINE       xff1                                        
ora.oc4j
      1        ONLINE  ONLINE       xff1                                        
ora.scan1.vip
      1        ONLINE  ONLINE       xff2                                        
ora.xff1.vip
      1        ONLINE  ONLINE       xff1                                        
ora.xff2.vip
      1        ONLINE  ONLINE       xff2                                        
ora.xffdb.db
      1        ONLINE  ONLINE       xff1                     Open               
      2        ONLINE  ONLINE       xff2                     Open
查看修改后的scan listener状态
xff2:/home/grid> lsnrctl status LISTENER_SCAN1
 
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-MAR-2016 17:02:32
 
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                12-MAR-2016 16:59:05
Uptime                    0 days 0 hr. 3 min. 27 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/app/grid/network/admin/listener.ora
Listener Log File         /u01/oracle/app/grid/log/diag/tnslsnr/xff2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.137.248)(PORT=1521)))
The listener supports no services
The command completed successfully
 
[root-www.111cn.net@xff2 ~]# su - oracle
xff2:/home/oracle> sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.4.0 Production on Sat Mar 12 17:01:11 2016
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
 
SQL> alter system register;
 
System altered.
 
SQL> /
 
System altered.
 
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
xff2:/home/oracle> exit
logout
[root-www.111cn.net@xff2 ~]# su - grid
xff2:/home/grid> lsnrctl status LISTENER_SCAN1
 
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-MAR-2016 17:01:24
 
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                12-MAR-2016 16:59:05
Uptime                    0 days 0 hr. 2 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/app/grid/network/admin/listener.ora
Listener Log File         /u01/oracle/app/grid/log/diag/tnslsnr/xff2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.137.248)(PORT=1521)))
The listener supports no services
The command completed successfully
这里发现修改scan ip之后,scan listener没有正确或者到监听的动态注册信息,哪怕人工执行了alter system register;也不行.

通过重启数据库,解决修改scan ip后的动态监听注册问题
[root-www.111cn.net@xff2 ~]# su - oracle
xff2:/home/oracle> srvctl stop database -d xffdb
xff2:/home/oracle> srvctl start database -d xffdb
xff2:/home/oracle> exit
logout
[root-www.111cn.net@xff2 ~]# su - grid
xff2:/home/grid> lsnrctl status LISTENER_SCAN1
 
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-MAR-2016 17:06:17
 
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                12-MAR-2016 16:59:05
Uptime                    0 days 0 hr. 7 min. 11 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/app/grid/network/admin/listener.ora
Listener Log File         /u01/oracle/app/grid/log/diag/tnslsnr/xff2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.137.248)(PORT=1521)))
Services Summary...
Service "xffdb" has 2 instance(s).
  Instance "xffdb1", status READY, has 1 handler(s) for this service...
  Instance "xffdb2", status READY, has 1 handler(s) for this service...
Service "xffdbXDB" has 2 instance(s).
  Instance "xffdb1", status READY, has 1 handler(s) for this service...
  Instance "xffdb2", status READY, has 1 handler(s) for this service...
The command completed successfully

原文来自:http://www.xifenfei.com/2016/03/修改11-2-rac-的-scan-ip.html

时间: 2025-01-01 17:55:26

oracle数据库修改11.2 RAC 的 SCAN IP的例子的相关文章

Oracle11gR2 RAC 使用scan IP无法连接(ORA-12545)

Oracle11GR2 RAC使用scan IP无法连接到数据库,报错 ORA-12545: 因目标主机或对象不存在, 连接失败 现象: 在windows客户端sqlplus工具使用scan的IP无法连接,报错如下: C:Windowssystem32> sqlplus song/123456@10.10.23.3:11521/orcl SQL*Plus: Release 11.2.0.1.0 Production on Thu May 17 12:35:28 2012 Copyright (c

11g rac配置scan ip

如果是从10g转战11g rac就会发现很多不同之处,其中一个比较大的改变就是在11g中有了一个新特性scan,其实这是一个简称,完整的名称为:SCAN(Single Client Access Name),但是单纯根据简称理解为scan似乎也能说得通. 在10g中我们一般是这么配置tns的.racdb= (DESCRIPTION =   (ADDRESS= (PROTOCOL= TCP)(HOST=192.168.3.101)(PORT= 1521))   (ADDRESS= (PROTOCO

Oracle数据库修改实例名SID的方法步骤

  有时候我们需要修改Oracle数据库的实例名SID,下面是在Centos 6.5下修改ORACLE10.2的实例名的实例教程,感兴趣学习的朋友可以看下. 修改Oracle实例名 系统环境:CentOS 6.5 ORACLE版本:10.2 1.检查原来的数据库实例名 $ echo $ORACLE_SID orcl $ sqlplus / as sysdba > select instance from v$thread; INSTANCE ---------------------------

oracle数据库数套ASM RAC的恢复案例

前不久帮助某客户恢复了6套Oracle RAC,均为ASM,而且版本均为10.2.0.4.熬夜好几天,差点吐血了. 这里以其中一套库的恢复进行简单说明,跟大家分享. 其中几套基本上都遇到了如下的ORA-00600 错误: Thu Dec 31 11:55:46 2015 SUCCESS: diskgroup DG1 was mounted Thu Dec 31 11:55:50 2015 Errors in file /oracle/admin/xxx/udump/xxx1_ora_28803.

oracle数据库1.4TB ASM(RAC) 磁盘损坏恢复案例

这周折腾了2天的时间帮客户成功恢复了一套近1.4TB的10.2.0.5 RAC(ASM). 该库在3月4号直接crash了. 大家可以看到,该库在开始报错读取redo,controlfile报错,本质原因是DISKGROUP dismount了,信息如下: Tue Mar 04 18:09:59 CST 2014 Errors in file /home/oraprod/10.2.0/db/admin/xxxx/bdump/xxxx_lgwr_15943.trc: ORA-00345: redo

oracle 数据库单实例和rac中listener的区别

1.关于动态注册和静态注册的区别 参考文章:http://blog.csdn.net/cymm_liu/article/details/7262630 2.关于local_listener 和 remote_listener的区别: 过程描述:        当客户端发出连接请求给server端listener的时候,通过local_listener注册的服务接收这个连接请求,然后由master instance来决定这个连接请求应该由哪个目标instance发出server process响应

Oracle11gR2 RAC 使用scan IP无法连接数据库(ORA-12545)问题解决

环境:[grid@rac1 ~]$ cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1       localhost.localdomain localhost::1        localhost6.localdomain6 localhost6# Public192.168.2.101   

ORACLE 11.2 RAC修改数据库静态参数

操作系统:HP UNIX 11.31 数据库:oracle 11.2 rac 今天对一套ORACLE 11.2 RAC数据库进行参数调整,修改db_files为3000,系统默认为200.顺便修改了操作系统的内核参数:fs_async,服务器也需要重启. 操作计划: 1.参数在两个节点都修改完毕,不重启机器和数据. 2.先重启节点1,节点2先不动,等节点1起来之后,再重启节点2. 故障: 可是在节点1启动之后,实例怎么都起不来,然后手工用srvctl启动实例报错: racdb1:/home/gr

oracle中11.2 RAC安装新主机,识别老存储-3-配置老存储的数据库

安装Oracle 11.2.0.4数据库软件,然后执行root.sh,这个没有特别的东西,略. 之后,我们需要修改ORACLE RDBMS的oracle二进制文件的权限,让oracle 数据库进程可以获取ASM磁盘组. [root@lunar5 ~]# su - grid [grid@lunar5 ~]$ $ORACLE_HOME/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle [grid@luna