Client configuration and error:
[Oracle @ bys3 admin] $ cat tnsnames. ora
Bysrac =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.228) (PORT = 1521) -- the ip address here is the scanip address of RAC.
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = bysrac)
)
)
[Oracle @ bys3 admin] $ tnsping bysrac
TNS Ping Utility for Linux: Version 11.2.0.4.0-Production on 01-JAN-2014 20:25:19
Copyright (c) 1997,201 3, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.228) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bysrac )))
OK (10 msec) -- tnsping can be connected normally.
Client using sqlplus bys/bys @ bysrac login error: ORA-12545: Connect failed because target host or object does not exist
[Oracle @ bys3 admin] $ sqlplus bys/bys @ bysrac
SQL * Plus: Release 11.2.0.4.0 Production on Wed Jan 1 20:10:31 2014
Copyright (c) 1982,201 3, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
################
Solution: Modify the local_listener parameter of RAC and change the value of HOST = In the parameter value to the VIP or scanip address of the current node.
Note: When the HOST parameter is the IP address of the vip address of the current node, the client can connect to the RAC database through SCANIP or VIP-here is the IP address changed to VIP. -- In fact, it should be changed to SCANIP, and the client uses SCANIP for connection.
The HOST parameter is the scanip address, and after the parameter is modified, scanip can be used normally, but if there is a client configuration using vip, the connection will encounter an error: ORA-12514: TNS: listener does not currently know of service requested in connect descriptor.
Specific modification steps:
View the SCANIP status and listening status of RAC
[Oracle @ bysrac1 ~] $ Su-grid
Password:
[Grid @ bysrac1 ~] $ Srvctl config scan
SCAN name: bysrac-cluster-scan, Network: 1/192. 168.1.128/255.255.255.128/eth0
Scan vip name: scan1, IP:/bysrac-cluster/192.168.1.228
[Grid @ bysrac1 ~] $ Srvctl status scan
Scan vip scan1 is enabled
Scan vip scan1 is running on node bysrac1
[Grid @ bysrac1 ~] $ Lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0-Production on 01-JAN-2014 20:10:13
Copyright (c) 1991,200 9, 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.1.0-Production
Start Date 28-DEC-2013 20:06:56
Uptime 4 days 0 hr. 3 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/g01/app/11.2.0/grid/network/admin/listener. ora
Listener Log File/g01/app/grid/diag/tnslsnr/bysrac1/listener/alert/log. xml
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.226) (PORT = 1521 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.221) (PORT = 1521 )))
Services Summary...
Service "+ ASM" has 1 instance (s ).
Instance "+ ASM1", status READY, has 1 handler (s) for this service...
Service "bysrac" has 1 instance (s ).
Instance "bysrac1", status READY, has 1 handler (s) for this service...
Service "caiwu" has 1 instance (s ).
Instance "bysrac1", status READY, has 1 handler (s) for this service...
Service "jiaoyi" has 1 instance (s ).
Instance "bysrac1", status READY, has 1 handler (s) for this service...
The command completed successfully
[Grid @ bysrac1 ~] $ Exit
[Oracle @ bysrac1 ~] $ 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.1.221 bysrac1 bysrac1.bys.com
192.168.1.226 bysrac1-vip
192.168.1.222 bysrac2 bysrac2.bys.com
192.168.1.227 bysrac2-vip
192.168.10.1 bysrac1-priv
Bysrac2-priv 192.168.10.2
192.168.1.228 bysrac-cluster-scan
Experiment 1: Modify the local_listener parameter of RAC and change the value of HOST = In the parameter value to the VIP value of the current node.
[Oracle @ bysrac1 ~] $ Sqlplus bys/bys
BYS @ bysrac> select instance_name from v $ instance;
INSTANCE_NAME
----------------
Bysrac1
BYS @ bysrac1> show parameter local_l ------- view the value of the local_listener parameter
NAME TYPE VALUE
-----------------------------------------------------------------------------
Local_listener string (DESCRIPTION = (ADDRESS_LIST = (AD
DRESS = (PROTOCOL = TCP) (HOST = bysr
Ac1-vip) (PORT = 1521 ))))
BYS @ bysrac1> alter system set local_listener = '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.226) (PORT = 1521 )))) 'sid = 'bysrac1 ';
System altered. -- Here HOST = 192.168.1.226 is changed to the IP address of the VIP address of the node. I have modified only one node here. If multiple nodes exist, modify them on other nodes as per this method.
BYS @ bysrac1> show parameter local_l
NAME TYPE VALUE
-----------------------------------------------------------------------------
Local_listener string (DESCRIPTION = (ADDRESS_LIST = (AD
DRESS = (PROTOCOL = TCP) (HOST = 192.
168.1.226) (PORT = 1521 ))))
BYS @ bysrac1> exit --- You can manually register and listen to alter system register before exiting. This is also possible if you have not done so here.
Oracle ORA-01555 snapshot old description
Troubleshooting for ORA-01078 and LRM-00109
ORA-01555 ultra-long Query Duration time
Notes on ORA-00471 Processing Methods
ORA-00314, redolog corruption, or missing Handling Methods
Solution to ORA-00257 archive logs being too large to store