Chinaunix首页 | 论坛 | 博客
  • 博客访问: 815353
  • 博文数量: 199
  • 博客积分: 6363
  • 博客等级: 准将
  • 技术积分: 2225
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-28 10:01
个人简介

来自农村的老实娃

文章分类

全部博文(199)

文章存档

2017年(1)

2014年(2)

2013年(3)

2012年(6)

2011年(26)

2010年(34)

2009年(50)

2008年(44)

2007年(33)

我的朋友

分类: Oracle

2011-12-28 10:57:42

In this Document
  Goal
  Solution
     A. To update SCAN setting
     B. To modify SCAN listener port
  References

 

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

 

Applies to:
Oracle Server - Enterprise Edition - Version: 11.2.0.1 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Goal
This note is to provide steps to update 11gR2 (11.2) Grid Infrastructure (CRS) Single Client Access Name (SCAN) setting or SCAN listener port setting if it's not setup properly or if it's changed after setup. The procedure for SCAN setting doesn't apply if GNS is enabled.

Solution


A. To update SCAN setting
1. As per documentation "Oracle Grid Infrastructure Installation Guide", Oracle strongly recommend to configure SCAN name in either DNS or GNS as /etc/hosts file can only resolve to one IP address.

SCAN IP must be in same subnet as public and VIP. If the new SCAN IP will be in different subnet, refer to note 276434.1 to change nodeapps/network resource first.

1a. If you intend to use /etc/hosts for SCAN name resolution, the same and only entry for SCAN name must exist on all nodes.

1b. If you intend to use DNS for SCAN name resolution, remove entries for SCAN name from /etc/hosts on all nodes, and make sure nslookup returns good result on all nodes, for example:


$ nslookup pay-scan.us.oracle.com
..
Name:   pay-scan.us.oracle.com
Address: 10.4.0.201
Name:   pay-scan.us.oracle.com
Address: 10.4.0.202
Name:   pay-scan.us.oracle.com
Address: 10.4.0.203


2. Once #1a or #1b is configured properly, execute the following to modify:

If name resolution for SCAN is being switched from local hosts file to DNS, be sure to remove SCAN name in local hosts file on all nodes prior to execute below commands.

2.1. To modify SCAN name or SCAN VIP addresses:

2.1.1. As grid user stop resources:

$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl stop scan
2.1.2. As root user modify SCAN:

# $GRID_HOME/bin/srvctl modify scan -n pay-scan.us.oracle.com 

### For 11.2.0.1 only, if you intend to change SCAN name, due to bug 9603829, execute the following:

# $GRID_HOME/bin/crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE="

### Example:
# $GRID_HOME/bin/crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=pay-scan.us.oracle.com"
Once SCAN name is changed, update database init.ora/spfile parameter remote_listener to the new one.

2.1.3. As grid user start resources:

$ $GRID_HOME/bin/srvctl start scan_listener

2.1.4. To confirm the change

$ $GRID_HOME/bin/srvctl config scan
SCAN name: pay-scan.us.oracle.com, Network: 1/10.4.0.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /10.4.0.201/120.0.0.201
SCAN VIP name: scan2, IP: /10.4.0.202/120.0.0.202
SCAN VIP name: scan3, IP: /10.4.0.203/120.0.0.203

$ $GRID_HOME/bin/srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521


2.2. To change SCAN to be on second network:

By default, SCAN will be configured on first public network (ora.net1.network), however in multiple public network environment, SCAN can run on second or other network.

There's no option to modify SCAN to use non-first network, to change to second or other network, scan_listener and scan resources need to be removed and added back.

In this example, we'll move SCAN from net1 to net2


$ $GRID_HOME/bin/srvctl config network
Network exists: 1/10.1.0.0/255.255.255.128/eth3, type static
Network exists: 2/10.1.1.0/255.255.255.128/eth4, type static

2.2.1. As grid user stop resources and remove scan_listener:

$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl remove scan_listener -f
$ $GRID_HOME/bin/srvctl stop scan
2.2.2. As root user remove and add SCAN:

# $GRID_HOME/bin/srvctl remove scan -f
# $GRID_HOME/bin/srvctl add scan -n -k 2

Once SCAN name is changed, update database init.ora/spfile parameter remote_listener to the new one.

2.2.3. As grid user add scan_listener and start resources:

$ $GRID_HOME/bin/srvctl add scan_listener -p
$ $GRID_HOME/bin/srvctl start scan_listener

 

B. To modify SCAN listener port
As grid user:

1. Modify SCAN listener port:


$GRID_HOME/bin/srvctl modify scan_listener -p

2. Restart SCAN listener so the new port will be effective:


$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl start scan_listener

3. Confirm the change:


$GRID_HOME/bin/srvctl config scan_listener

 

阅读(1657) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~