10g rac Node 2 goes down. By modifying listener. ora, the client connects to the database through node 2VIP.

Source: Internet
Author: User
Tags snmp

According to an experiment in Zhou Liang's oracle dba practice.
Environment Description: node 2 is down in the 10g rac environment at two nodes. In this case, the client cannot connect to the database through the VIP address of the original Node 2. The client needs to be modified on the server because of many modifications.


1. Check Node 1 listening status,/etc/hosts, IP information [oracle @ rac1 admin] $ ifconfig
Eth0 Link encap: Ethernet HWaddr 08: 00: 27: 93: AD: F2
Inet addr: 192.168.57.219 Bcast: 192.168.57.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 112453 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 2496 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 68881461 (65.6 MiB) TX bytes: 332010 (324.2 KiB)

Eth0: 1 Link encap: Ethernet HWaddr 08: 00: 27: 93: AD: F2
Inet addr: 192.168.57.221 Bcast: 192.168.57.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1

Eth0: 2 Link encap: Ethernet HWaddr 08: 00: 27: 93: AD: F2
Inet addr: 192.168.57.222 Bcast: 192.168.57.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1

Eth1 Link encap: Ethernet HWaddr 08: 00: 27: 33: 81: 45
Inet addr: 192.168.58.1 Bcast: 192.168.58.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 1750 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 150571 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 150427 (146.9 KiB) TX bytes: 130002468 (123.9 MiB)

Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Up loopback running mtu: 16436 Metric: 1
RX packets: 82328 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 82328 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 13965995 (13.3 MiB) TX bytes: 13965995 (13.3 MiB)
[Oracle @ rac1 admin] $ cat/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1 localhost. localdomain localhost
: 1 localhost6.localdomain6 localhost6
192.168.57.219 rac1.bys.com rac1
192.168.57.220 rac2.bys.com rac2
192.168.57.221 rac1-vip
192.168.57.222 rac2-vip
Rac1-priv 192.168.58.1
Rac2-priv 192.168.58.2
[Oracle @ rac1 admin] $ lsnrctl status LISTENER_RAC1

LSNRCTL for Linux: Version 10.2.0.1.0-Production on 09-APR-2014 23:22:19

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

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = rac1-vip) (PORT = 1521) (IP = FIRST )))
STATUS of the LISTENER
------------------------
Alias LISTENER_RAC1
Version TNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date 09-APR-2014 23:19:51
Uptime 0 days 0 hr. 2 min. 27 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/dbhome_1/network/admin/listener. ora
Listener Log File/u01/app/oracle/product/dbhome_1/network/log/listener_rac1.log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.57.221) (PORT = 1521 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.57.219) (PORT = 1521 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC )))
Services Summary...
Service "+ ASM" has 1 instance (s ).
Instance "+ ASM1", status BLOCKED, has 1 handler (s) for this service...
Service "+ ASM_XPT" has 1 instance (s ).
Instance "+ ASM1", status BLOCKED, has 1 handler (s) for this service...
Service "RAC" has 1 instance (s ).
Instance "RAC1", status READY, has 2 handler (s) for this service...
Service "RAC_XPT" has 1 instance (s ).
Instance "RAC1", status READY, has 2 handler (s) for this service...
The command completed successfully
[Oracle @ rac1 admin] $ crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... C1.inst application ONLINE rac1
Ora... C2.inst application ONLINE OFFLINE
Ora. RAC. db application ONLINE rac1
Ora... SM1.asm application ONLINE rac1
Ora... C1.lsnr application ONLINE rac1
Ora. rac1.gsd application ONLINE rac1
Ora. rac1.ons application ONLINE rac1
Ora. rac1.vip application ONLINE rac1
Ora... SM2.asm application ONLINE OFFLINE
Ora... C2.lsnr application ONLINE OFFLINE
Ora. rac2.gsd application ONLINE OFFLINE
Ora. rac2.ons application ONLINE OFFLINE
Ora. rac2.vip application ONLINE rac1

######################################## ########################
2. Modify the listener Configuration File listener. ora of Node 1 ---- back up the original listener Configuration File before modification:
[Oracle @ rac1 admin] $ cat listener. orabak
# Listener. ora. rac1 Network Configuration File:/u01/app/oracle/product/dbhome_1/network/admin/listener. ora. rac1
# Generated by Oracle configuration tools.
LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac1-vip) (PORT = 1521) (IP = FIRST ))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.57.219) (PORT = 1521) (IP = FIRST ))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC ))
)
)
)
###### After modification: -- The modified content is to remove (IP = FIRST), so that the listener will run on all the IP addresses of the host (192.168.57.219 and two VIPs here: 192.168.57.221, 192.168.57.222 ).
[Oracle @ rac1 admin] $ cat listener. ora
# Listener. ora. rac1 Network Configuration File:/u01/app/oracle/product/dbhome_1/network/admin/listener. ora. rac1
# Generated by Oracle configuration tools.

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac1) (PORT = 1521 ))
)
(ADDRESS_LIST =
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC ))
)
)
)

################
View the tnsnames. ora file:

[Oracle @ rac1 admin] $ cat tnsnames. ora
RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac2-vip) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC)
)
)
RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac1-vip) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC)
)
)
View the listening status:
Lsnrctl stop LISTENER_RAC1
Lsnrctl start LISTENER_RAC1
[Oracle @ rac1 admin] $ lsnrctl status LISTENER_RAC1
LSNRCTL for Linux: Version 10.2.0.1.0-Production on 09-APR-2014 22:48:11
Copyright (c) 1991,200 5, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = rac1) (PORT = 1521 )))
STATUS of the LISTENER
------------------------
Alias LISTENER_RAC1
Version TNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date 09-APR-2014 22:46:50
Uptime 0 days 0 hr. 1 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/dbhome_1/network/admin/listener. ora
Listener Log File/u01/app/oracle/product/dbhome_1/network/log/listener_rac1.log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = rac1.bys.com) (PORT = 1521 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC )))
Services Summary...
Service "+ ASM" has 1 instance (s ).
Instance "+ ASM1", status BLOCKED, has 1 handler (s) for this service...
Service "+ ASM_XPT" has 1 instance (s ).
Instance "+ ASM1", status BLOCKED, has 1 handler (s) for this service...
Service "RAC" has 1 instance (s ).
Instance "RAC1", status READY, has 2 handler (s) for this service...
Service "RAC_XPT" has 1 instance (s ).
Instance "RAC1", status READY, has 2 handler (s) for this service...
The command completed successfully
# Connection test [oracle @ rac1 admin] $ sqlplus system/system @ rac2
SQL * Plus: Release 10.2.0.1.0-Production on Wed Apr 9 22:43:32 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> select instance_name from v $ instance;

INSTANCE_NAME
----------------
RAC1

SQL> exit

The four IP addresses 192.168.57.219, 192.168.57.221, 192.168.57.222, and 192.168.58.1 can be used to log on: -- The listener. ora is also verified (HOST = HOST Name runs on all IP addresses of the HOST.
[Oracle @ rac1 admin] $ sqlplus system/system@192.168.57.221: 1521/rac
SQL * Plus: Release 10.2.0.1.0-Production on Wed Apr 9 22:53:30 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[Oracle @ rac1 admin] $ sqlplus system/system@192.168.57.222: 1521/rac
SQL * Plus: Release 10.2.0.1.0-Production on Wed Apr 9 22:53:37 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> ei ^ H
SP2-0042: unknown command "e"-rest of line ignored.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[Oracle @ rac1 admin] $ sqlplus system/system@192.168.57.219: 1521/rac
SQL * Plus: Release 10.2.0.1.0-Production on Wed Apr 9 22:53:46 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL>

[Oracle @ rac1 admin] $ sqlplus system/system@192.168.58.1: 1521/rac
SQL * Plus: Release 10.2.0.1.0-Production on Wed Apr 9 22:55:31 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> exit








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.