Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SCAN IP in Oracle 11gR2 RAC

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

In Oracle 11gR2, the feature of SCAN (Single ClientAccess Name) is introduced. SCAN is a domain name, which can resolve at least 1 IP and up to 3 SCAN IP. The client can access the database through this SCAN name. In addition, SCAN ip must be in the same subnet as public ip and VIP.

Before 11gR2, VIP is used to configure TNS connection strings. If nodes are added to the RAC cluster or VIP changes, you need to modify the TNS configuration of all clients. This is troublesome, and these troubles are saved after the introduction of SCAN. After SCAN is enabled, a virtual service layer is added between the database and the client, namely SCANIP and SCANIP Listener. The client only needs to configure the tns information of SCANIP and connect to the backend cluster database through SCANIP Listener. In this way, no matter whether the cluster database has the operation of adding or deleting nodes, it will not affect the client, and there is no need to modify the configuration.

1. There are three ways to configure SCAN:

1. Use the / etc/hosts file

This is the most common way we use at present, but the disadvantage can only correspond to one SCAN IP. This method is not recommended by Oracle, but it is simple and does not require a separate DNS server. Using this method, the client still needs VIP to link. Oracle recommends two other ways to implement SCAN functionality.

two。 If you define a domain name in DNS, you only need to configure it in DNS to realize the SCAN function.

3. With Grid Naming Server (GNS), you need to configure DNS and DHCP to achieve SCAN functionality.

Note: this is an excerpt from David's blog, http://blog.csdn.net/tianlesoftware/article/details/42712979. What puzzles me is that using the first method can also use SCAN IP to connect to the database, but why does davide say that it is still necessary to use VIP to connect?

After the configuration is complete, you can use SCAN IP to connect to the database in the TNS connection string.

2. SCAN workflow

After the SCAN feature is enabled, there will be several more SCAN IP Listener in addition to a few more SCAN IP, each SCAN IP corresponding to a SCAN IP Listener, and each SCAN IP and its corresponding SCAN IP Listener will be allocated independently to each node for performance reasons.

As you can see from the figure given by Oracle, on the right side of the figure is a four-node RAC cluster, so there are four Local Listener. 3 SCAN IP and 3 SCAN Listeners are configured. These three SCAN IP are randomly placed on the RAC node.

For more conceptual stuff, please refer to David's blog: http://blog.csdn.net/tianlesoftware/article/details/42712979.

3. Actual management of SCAN

When installing RAC, you need to configure the following information in the / etc/hosts file:

After starting the cluster, you can see SCAN services, which are divided into cluster resources, and you can see vip services and listening services.

Use srvctl to manage scan. The following is to view the status and configuration of SCAN and SCAN_LISTENER

Let's take a look at the status of SCAN Listenre and the listening service.

From the above, you can see that this SCAN Listener listens for two instances, which is achieved through the remote_listener parameter.

As can be seen from the above configuration, there is only one SCAN IP in this cluster, and now a SCAN IP is added.

First add a new ip to the / etc/hosts file of the two nodes

192.168.56.27 rac-scan

After the addition, modify the SCAN service

As you can see from the figure above, the new IP has been added to the SCAN service, but it hasn't been run yet. Execute the following command

From the screenshot above, you can see that despite the error, the scan2 service is still started and the virtual IP has been bound to the network card.

But now there is only one SCAN Listener, so let's start the second listening:

Check whether the second monitor has a database service after starting the monitoring

Test using the new SCAN IP to connect to the database

Connection successful.

Reference: Grid Infrastructure Single Client Access Name (SCAN) Explained (document ID 887522.1)

Http://docs.oracle.com/cd/E11882_01/rac.112/e41960/toc.htm

Http://blog.csdn.net/tianlesoftware/article/details/42712979

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report