Oracle 11gR2 RAC Listener principle Introduction

Source: Internet
Author: User
Tags reserved snmp

Tag: DDR Oracle command file recommended key load ISP cannot

First, the basic concept

ORACLE11GR2 RAC began to introduce the scan concept, usually through a DNS server or GNS server to resolve the scan, you can also use the/etc/hosts file to parse scan, but Oracle is not recommended to do so, the hosts file can only parse a scan IP Another aspect the listener moves forward to the $grid_home/network/admin/listener.ora file, that is, the 11g RAC Listener is managed by the GRID user, and the Oracle user retains the file but has no effect. Client file Tnsnames.ora is still in the $oracle_home/network/admin/tnsnames.ora file. Scan of the proposed completely do the RAC database to the user transparent management, the client through the scan domain name directly connected to the database (the client can resolve the scan domain name), specifically by the DNS server to resolve the domain name, if you use DNS resolution scan, up to 3 scan VIP can be resolved, Accessing the database via the scan domain name allows the failover and load balancing of the scan VIP, which means that the client application can access the database as long as one of the 3 scan VIPs is alive. If you use the Hosts file to parse scan, only one scan VIP can be parsed.

The Listener in the Oracle 10g RAC is managed by an Oracle user, with only one listener on each node, but the listener listens to both the public IP and the VIP, which is the listener in the Oracle 10g RAC that assumes the ability to route and establish connections. The 10g RAC client connects to the database through the VIP.

The listener under Grid_home is used in the Oracle 11g RAC instead of the listener under Oracle_home, and multiple listeners appear in the Oracle 11g RAC, using the name distinction. So a 11g RAC listener is managed by a grid user and not by an Oracle user. The 11g RAC listener is divided into local listeners (establishing connections) and scan listeners (route forwarding) 2, and each scan VIP will have a scan listener and run on the same node. That

RAC, a local listener is running on each node, and the listener is responsible for listening to the local VIP.

In a RAC, a scan listener is run on 3 nodes.

In RAC, the SCANVIP and scan listeners appear paired.

Second, listener management and fault handling

Node 1 Listener.ora configuration:

[Email protected] admin]$ pwd

/u01/app/11.2.0/grid/network/admin

[email protected] admin]$ cat Listener.ora

# listener.ora.node1 Network Configuration File:/u01/app/11.2.0/grid/network/admin/listener.ora.node1

# Generated by Oracle configuration tools.

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3 = On

Enable_global_dynamic_endpoint_listener_scan2 = On

Enable_global_dynamic_endpoint_listener_scan1 = On

Enable_global_dynamic_endpoint_listener1 = On

LISTENER =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = IPC) (KEY = LISTENER))

)

)

Enable_global_dynamic_endpoint_listener = On

LISTENER_SCAN3 =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = IPC) (KEY = listener_scan3))

)

)

Listener_scan2 =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = IPC) (KEY = listener_scan2))

)

)

Listener_scan1 =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = IPC) (KEY = Listener_scan1))

)

)

Node 2 Listener.ora configuration:

[Email protected] admin]$ pwd

/u01/app/11.2.0/grid/network/admin

[email protected] admin]$ cat Listener.ora

# Listener.ora.node2 Network Configuration File:/u01/app/11.2.0/grid/network/admin/listener.ora.node2

# Generated by Oracle configuration tools.

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3 = On

Enable_global_dynamic_endpoint_listener_scan2 = On

Enable_global_dynamic_endpoint_listener_scan1 = On

Enable_global_dynamic_endpoint_listener1 = On

Sid_list_listener1 =

(Sid_list =

(Sid_desc =

(Global_dbname = ORCL)

(Oracle_home =/u01/app/11.2.0/grid)

(Sid_name = Orcl2)

)

)

LISTENER =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = LISTENER))

)

Adr_base_listener =/u01/app/grid

Enable_global_dynamic_endpoint_listener = On

LISTENER_SCAN3 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = listener_scan3))

)

Listener_scan2 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = listener_scan2))

)

Listener_scan1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = Listener_scan1))

)

ADR_BASE_LISTENER_SCAN3 =/u01/app/grid

Adr_base_listener_scan2 =/u01/app/grid

Adr_base_listener_scan1 =/u01/app/grid

1. View Scan VIP Configuration

Node 1:

[Email protected] admin]$ srvctl config scan

SCAN Name:scan-cluster, Network:1/192.168.100.0/255.255.255.0/eth0

SCAN VIP name:scan1, IP:/scan-cluster/192.168.100.45

SCAN VIP name:scan2, IP:/scan-cluster/192.168.100.46

SCAN VIP name:scan3, IP:/scan-cluster/192.168.100.47

Node 2:

[Email protected] admin]$ srvctl config scan

SCAN Name:scan-cluster, Network:1/192.168.100.0/255.255.255.0/eth0

SCAN VIP name:scan1, IP:/scan-cluster/192.168.100.45

SCAN VIP name:scan2, IP:/scan-cluster/192.168.100.46

SCAN VIP name:scan3, IP:/scan-cluster/192.168.100.47

2. View Scan VIP status (Static)

Node 1:

[grid@node1 admin]$ srvctl status Scan

SCAN VIP scan1 is enabled

SCAN VIP Scan1 is running on node Node2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node Node2

SCAN VIP SCAN3 is enabled

SCAN VIP Scan3 is running on node Node1

Node 2:

[grid@node2 admin]$ srvctl status Scan

SCAN VIP scan1 is enabled

SCAN VIP Scan1 is running on node Node2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node Node2

SCAN VIP SCAN3 is enabled

SCAN VIP Scan3 is running on node Node1

3. View Scan VIP status (dynamic)

Node 1:

[Email protected] admin]$ srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP Scan1 is running on node Node2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node Node2

SCAN VIP SCAN3 is enabled

SCAN VIP Scan3 is running on node Node1

Node 2:

[Email protected] admin]$ srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP Scan1 is running on node Node2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node Node2

SCAN VIP SCAN3 is enabled

SCAN VIP Scan3 is running on node Node1

4. View Scan Listener Configuration

Node 1:

[Email protected] admin]$ 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

Node 2:

[Email protected] admin]$ 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

5. View Scan Listener Status

Node 1:

[Email protected] admin]$ srvctl status Scan_listener

SCAN Listener listener_scan1 is enabled

SCAN Listener Listener_scan1 is running on node Node2

SCAN Listener listener_scan2 is enabled

SCAN Listener listener_scan2 is running on node Node2

SCAN Listener LISTENER_SCAN3 is enabled

SCAN Listener Listener_scan3 is running on node Node1

Node 2:

[Email protected] admin]$ srvctl status Scan_listener

SCAN Listener listener_scan1 is enabled

SCAN Listener Listener_scan1 is running on node Node2

SCAN Listener listener_scan2 is enabled

SCAN Listener listener_scan2 is running on node Node2

SCAN Listener LISTENER_SCAN3 is enabled

SCAN Listener Listener_scan3 is running on node Node1

LSNRCT command to view scan VIP status:

Node 1:

[Email protected] admin]$ lsnrctl status listener_scan3

Lsnrctl for linux:version 11.2.0.4.0-production on 25-mar-2016 16:09:39

Copyright (c) 1991, Oracle. All rights reserved.

Connecting to (Description= (address= (PROTOCOL=IPC) (KEY=LISTENER_SCAN3)))

STATUS of the LISTENER

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

Alias LISTENER_SCAN3

Version Tnslsnr for Linux:version 11.2.0.4.0-production

Start Date 25-mar-2016 11:24:15

Uptime 0 days 4 hr. Min. sec

Trace level off

Security on:local OS Authentication

SNMP OFF

Listener Parameter File/u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File/u01/app/11.2.0/grid/log/diag/tnslsnr/node1/listener_scan3/alert/log.xml

Listening Endpoints Summary ...

(Description= (address= (PROTOCOL=IPC) (KEY=LISTENER_SCAN3)))

(Description= (address= (protocol=tcp) (host=192.168.100.47) (port=1521)))

Services Summary ...

Service "ORCL" has 2 instance (s).

Instance "ORCL1", status ready, have 1 handler (s) for the This service ...

Instance "Orcl2", status ready, have 1 handler (s) for the This service ...

Service "Orclxdb" has 2 instance (s).

Instance "ORCL1", status ready, have 1 handler (s) for the This service ...

Instance "Orcl2", status ready, have 1 handler (s) for the This service ...

The command completed successfully

6. View Local listener Configuration

Node 1:

[Email protected] admin]$ SRVCTL Config listener

Name:listener

Network:1, Owner:grid

Home: <crs home>

End points:tcp:1521

Node 2:

[Email protected] admin]$ SRVCTL Config listener

Name:listener

Network:1, Owner:grid

Home: <crs home>

End points:tcp:1521

7. View Local listener status

Node 1:

[Email protected] admin]$ SRVCTL status Listener

Listener Listener is enabled

Listener Listener is running on node (s): Node2,node1

Node 2:

[Email protected] admin]$ SRVCTL status Listener

Listener Listener is enabled

Listener Listener is running on node (s): Node2,node1

Lsnrctl Viewing the local listener status:

Node 1:

[Email protected] admin]$ LSNRCTL status Listener

Lsnrctl for linux:version 11.2.0.4.0-production on 25-mar-2016 16:08:03

Copyright (c) 1991, Oracle. All rights reserved.

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=listener)))

STATUS of the LISTENER

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

Alias LISTENER

Version Tnslsnr for Linux:version 11.2.0.4.0-production

Start Date 25-mar-2016 11:24:17

Uptime 0 days 4 hr. Min. sec

Trace level off

Security on:local OS Authentication

SNMP OFF

Listener Parameter File/u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File/u01/app/grid/diag/tnslsnr/node1/listener/alert/log.xml

Listening Endpoints Summary ...

(Description= (address= (PROTOCOL=IPC) (Key=listener)))

(Description= (address= (protocol=tcp) (host=192.168.100.41) (port=1521)))

(Description= (address= (protocol=tcp) (host=192.168.100.42) (port=1521)))

Services Summary ...

Service "+asm" has 1 instance (s).

Instance "+asm1", status ready, have 1 handler (s) for the This service ...

Service "ORCL" has 1 instance (s).

Instance "ORCL1", status ready, have 1 handler (s) for the This service ...

Service "Orclxdb" has 1 instance (s).

Instance "ORCL1", status ready, have 1 handler (s) for the This service ...

The command completed successfully

8. View local running listeners

Node 1:

[Email protected] admin]$ Ps-ef|grep Lsnr

Grid 6290 8174 0 16:12 pts/1 00:00:00 grep Lsnr

Grid 23796 1 0 11:24? 00:00:00/u01/app/11.2.0/grid/bin/tnslsnr Listener_scan3-inherit

Grid 23859 1 0 11:24? 00:00:00/u01/app/11.2.0/grid/bin/tnslsnr Listener-inherit

Node 2:

[Email protected] admin]$ Ps-ef|grep Lsnr

Grid 8649 1 0 11:44? 00:00:00/u01/app/11.2.0/grid/bin/tnslsnr Listener_scan2-inherit

Grid 10591 1 0 Mar24? 00:00:01/u01/app/11.2.0/grid/bin/tnslsnr Listener-inherit

Grid 18776 6639 0 16:13 pts/1 00:00:00 grep Lsnr

Grid 24334 1 0 Mar24? 00:00:02/u01/app/11.2.0/grid/bin/tnslsnr Listener_scan1-inherit

9. View the status of the database service

[[email protected] admin]$ LSNRCTL Service

Lsnrctl for linux:version 11.2.0.4.0-production on 25-mar-2016 16:19:54

Copyright (c) 1991, Oracle. All rights reserved.

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=listener)))

Services Summary ...

Service "+asm" has 1 instance (s).

Instance "+asm1", status ready, have 1 handler (s) for the This service ...

Handler (s):

"Dedicated" established:0 refused:0 State:ready

LOCAL SERVER

Service "ORCL" has 1 instance (s).

Instance "ORCL1", status ready, have 1 handler (s) for the This service ...

Handler (s):

"Dedicated" Established:3 refused:0 State:ready

LOCAL SERVER

Service "Orclxdb" has 1 instance (s).

Instance "ORCL1", status ready, have 1 handler (s) for the This service ...

Handler (s):

"D000" established:0 refused:0 current:0 max:1022 state:ready

DISPATCHER <machine:node1, pid:11849>

(Address= (PROTOCOL=TCP) (Host=node1) (port=43836))

The command completed successfully

Oracle 11gR2 RAC Listener principle Introduction

Related Article

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.