---
title: "怎样修改 SCAN信息（来自于metalink）"
author: "libin123"
date: "2010-06-06T00:34:35Z"
tags: []
categories: ["数据库"]
slug: "scan-metalink"
draft: false
lastmod: "2010-06-06T00:34:35Z"
id: 684969
url: "https://dbua.iteye.com/blog/684969"
---

**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**

The goal of this document is to provide steps to update 11gR2 (11.2) Grid Infrastructure (CRS) Single Client Access Name (SCAN) setting if its not setup properly or if its got changed after setup.

The document doesn't apply when GNS is being used.

[]()**Solution**

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.

1a. If you intend to use /etc/hosts for SCAN name resolution, please make sure the same single entry for SCAN name in /etc/hosts on all nodes.

1b. If you intend to use DNS for SCAN name resolution, please remove entries for SCAN name in /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 confirmed, as grid home owner (not root) please execute following to modify:

 

$ GRID\_HOME=Directory\_of\_Your\_GRID\_Install  
$ export GRID\_HOME  
$ $GRID\_HOME/bin/srvctl stop scan\_listener  
$ $GRID\_HOME/bin/srvctl stop scan

\## as root execute next command  
\# $GRID\_HOME/bin/srvctl modify scan -n pay-scan.us.oracle.com   

\## If you intend to change SCAN name, for 11.2.0.1 as root execute next command; otherwise skip it  
\## if you modified SCAN name, make sure to update database init.ora parameter remote\_listener as well.

\# $GRID\_HOME/bin/crsctl modify type ora.scan\_vip.type -attr "ATTRIBUTE=SCAN\_NAME,DEFAULT\_VALUE=pay-scan.us.oracle.com"

$ $GRID\_HOME/bin/srvctl modify scan\_listener -u  
$ $GRID\_HOME/bin/srvctl start scan\_listener

3\. 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