[oracle@bys3 admin]$ sqlplus bys/bys
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 1 20:10:31 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
################
注意:HOST主机参数为当前节点vip的ip地址时,客户端通过SCANIP或者VIP都可以连接到RAC数据库库HOST主机参数为scanip地址,则修改完参数后,scanip能够正常使用,但如果有客户端配置使用vip的话,连接时则会出现错误:ORA-12514: TNS:listener does not currently know of service requested in connect descriptor。
具体修改步骤:
[oracle@bysrac1 ~]$ su - grid
Password:
[grid@bysrac1 ~]$
SCAN name: bysrac-cluster-scan, Network: 1/192.168.1.128/255.255.255.128/eth0
[grid@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, 2009, 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 "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 ~]$
# 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.222 bysrac2 bysrac2.bys.com
192.168.1.227 bysrac2-vip
192.168.10.1 bysrac1-priv
192.168.10.2 bysrac2-priv
[oracle@bysrac1 ~]$ sqlplus bys/bys
BYS@ bysrac>select instance_name from v$instance;
INSTANCE_NAME
----------------
BYS@ bysrac1>show parameter local_l
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)((PORT=1521))))
BYS@ bysrac1>alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP))(PORT=1521))))' sid='bysrac1';
System altered.
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 ---退出前可以手工注册下监听alter system register; 我这里没做也是可以的。
相关阅读:
Oracle ORA-01555 快照过旧 说明
ORA-01078 和 LRM-00109 报错解决方法
ORA-01555超长的Query Duration时间
ORA-00471 处理方法笔记
ORA-00314,redolog 损坏,或丢失处理方法
ORA-00257 归档日志过大导致无法存储的解决办法