Scan IP in Oracle 11gR2 RAC

Source: Internet
Author: User

In Oracle 11gR2, the features of the scan (single clientaccess Name) are introduced. Scan is a domain name, can resolve at least 1 IP, up to 3 scan IP, the client can access the database through this scan name, in addition the scan IP must be with the public IP and VIP in a subnet.

Configuring the TNS connection string before 11GR2 is a VIP, and if the RAC cluster adds a node or VIP changes, it will require a change to all of the client's TNS configurations, which can be cumbersome to eliminate after the introduction of scan. After the scan is enabled, a layer of virtual service layer is added between the database and the client, that is, scan IP and scan IP Listener, the client only needs to configure the TNS information of scan IP, through Scanip Listener, connect the background cluster database. This way, regardless of whether the cluster database has an operation to add or remove nodes, there is no effect on the client, and there is no need to modify the configuration.

1. There are 3 ways to configure scan:

1. Using the/etc/hosts file

This is the most common way we use, but the disadvantage can only correspond to a scan IP, the method Oracle is not recommended, but simple, do not need a separate DNS server, using this method, the client still need VIP to link. Oracle recommends the use of 2 other methods to implement the scan feature.

2. Define the domain name in DNS and only configure it in DNS to implement the scan function.

650) this.width=650; "Src=" http://img.blog.csdn.net/20150114173124562?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvdglhbmxlc29mdhdhcmu=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/ Gravity/center "style=" Border:none;height:auto; "/>

3. With grid naming Server (GNS), you need to configure DNS and DHCP to implement the scan feature.

650) this.width=650; "Src=" http://img.blog.csdn.net/20150114173130703?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvdglhbmxlc29mdhdhcmu=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/ Gravity/center "style=" Border:none;height:auto; "/>

Note: This section is excerpted from David's blog , http://blog.csdn.net/tianlesoftware/article/details/42712979, I'm confused that using the first method can also use the scan IP to connect to the database, But why does Davide say you still need to use a VIP to connect?

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

2. Scan Workflow

After enabling the scan feature, in addition to a few more scan IP, there will be more than a few scan IP Listener, each scan IP corresponding to a scan IP Listener, for performance reasons, each scan IP and its corresponding scan IP Listener will be Independently assigned to each node.

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/97/DB/wKioL1kz9CWgNqnQAAB3nt68u74190.jpg "title=" Scan.jpg "alt=" Wkiol1kz9cwgnqnqaab3nt68u74190.jpg "/>

As you can see from the diagram given by Oracle, the right side of the graph is a 4-node RAC cluster, so there are 4 local Listener. 3 Scan IP and 3 scan Listeners are configured. These 3 scan IPs are randomly dropped on the RAC node.

More conceptual stuff can be consulted on David's blog: http://blog.csdn.net/tianlesoftware/article/details/42712979.

3, the actual management scan

When installing RAC, you need to configure a message in the/etc/hosts file as follows:

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/97/DB/wKioL1kz9qXyymeiAAAFnHdRkDI382.png "title=" 1.png "alt=" Wkiol1kz9qxyymeiaaafnhdrkdi382.png "/>

After starting the cluster, you can see the services about scan, which are divided into cluster resources, and can see VIP service and monitoring service.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/97/DB/wKioL1kz9xzz2EJ7AAA53Az1sVg854.png "title=" 1.png "alt=" Wkiol1kz9xzz2ej7aaa53az1svg854.png "/>

Use Srvctl to manage scan, below to view the status and configuration of scan and Scan_listener

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/97/D9/wKiom1kz946TBSUxAABH9w4DJcs490.png "title=" 1.png "alt=" Wkiom1kz946tbsuxaabh9w4djcs490.png "/>

Here's a look at the status of Scan listenre, and the monitoring service

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/97/DB/wKioL1kz9-exQRMFAACwpNMWaYs518.png "title=" 1.png "alt=" Wkiol1kz9-exqrmfaacwpnmways518.png "/> From above can see this scan listener monitoring two instances, which is achieved through the Remote_listener parameters.

As can be seen from the configuration above, there is now only one scan IP in this cluster, now add a scan IP

Add a new IP to the two-node/etc/hosts file first

192.168.56.27 Rac-scan

After the add is complete, modify the scan service

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/97/DB/wKioL1kz-ZWTZE0YAABFYbIsgPU261.png "title=" 1.png "alt=" Wkiol1kz-zwtze0yaabfybisgpu261.png "/>

From which you can see that the new IP has been added to the scan service, but not yet running, execute the following command

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/97/DA/wKiom1kz_AuBdLw1AAAWYp8hHfM831.png "style=" float : none; "title=" 1.png "alt=" Wkiom1kz_aubdlw1aaawyp8hhfm831.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/97/DB/wKioL1kz_AzRLEDWAAAaihYsetU513.png "style=" float : none; "title=" 2.png "alt=" Wkiol1kz_azrledwaaaaihysetu513.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/97/DB/wKioL1kz_AzCucXPAAA8Kc1V3GI589.png "style=" float : none; "title=" 3.png "alt=" Wkiol1kz_azcucxpaaa8kc1v3gi589.png "/>

From the above can be seen that although the error, but the Scan2 service is still started, the virtual IP has been bound to the network card

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/97/DB/wKioL1kz_Hagf4pRAAA9DxuoCk8980.png "title=" 1.png "alt=" Wkiol1kz_hagf4praaa9dxuock8980.png "/> But now there is only one scan Listener, which starts with a second listener:

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/97/DB/wKioL1kz_aajEWnGAAAqqSCjDiI990.png "style=" float : none; "title=" 1.png "alt=" Wkiol1kz_aajewngaaaqqscjdii990.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/97/DA/wKiom1kz_abwh8OqAAAqu3BIQWU691.png "style=" float : none; "title=" 2.png "alt=" Wkiom1kz_abwh8oqaaaqu3biqwu691.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/97/DB/wKioL1kz_aej7Iv0AAAgXWW5o78482.png "style=" float : none; "title=" 3.png "alt=" Wkiol1kz_aej7iv0aaagxww5o78482.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/97/DB/wKioL1kz_aeDXitDAABFRKFHZAM822.png "style=" float : none; "title=" 4.png "alt=" Wkiol1kz_aedxitdaabfrkfhzam822.png "/>

Check to see if a second listener has a database service after starting the listener

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/97/DB/wKioL1kz_e3gAu_DAACwmIei0fQ992.png "title=" 1.png "alt=" wkiol1kz_e3gau_daacwmiei0fq992.png "/> test using a new scan IP connection database

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/97/DB/wKioL1kz_oeCNisvAAAdWsN0O7o769.png "title=" 1.png "alt=" Wkiol1kz_oecnisvaaadwsn0o7o769.png "/>

The connection was 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

This article is from the "DBA fighting!" blog, so be sure to keep this source http://hbxztc.blog.51cto.com/1587495/1932119

Scan IP in Oracle 11gR2 RAC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.