oracle 10g rac當監聽程式監聽對方vip時啟動監聽報錯TNS-12545
rac中各節點監聽程式本來只監聽當前節點的vip 和public ip,不知為何客戶的rac各個節點配置成監聽自己節點和對方節點的vip
連線rac資料庫報TNS-12545錯誤
登入資料庫伺服器執行crs_stat -t
[oracle@keqsi1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.keqjm.db application ONLINE ONLINE keqsi1
ora....m1.inst application ONLINE ONLINE keqsi1
ora....m2.inst application ONLINE ONLINE keqsi2
ora....orcl.cs application ONLINE ONLINE keqsi2
ora....jm1.srv application ONLINE ONLINE keqsi1
ora....jm2.srv application ONLINE ONLINE keqsi2
ora....SM1.asm application ONLINE ONLINE keqsi1
ora....I1.lsnr application ONLINE OFFLINE
ora.keqsi1.gsd application ONLINE ONLINE keqsi1
ora.keqsi1.ons application ONLINE ONLINE keqsi1
ora.keqsi1.vip application ONLINE ONLINE keqsi1
ora....SM2.asm application ONLINE ONLINE keqsi2
ora....I2.lsnr application ONLINE OFFLINE
ora.keqsi2.gsd application ONLINE ONLINE keqsi2
ora.keqsi2.ons application ONLINE ONLINE keqsi2
ora.keqsi2.vip application ONLINE ONLINE keqsi2
檢查listener.ora檔案:10.53.1.237和10.53.1.238是兩個節點
的虛擬IP地址
[oracle@keqsi2 admin]$ more listener.ora
# listener.ora.keqsi2 Network Configuration File: /u01/app/oracle/10gR2/db/network/admin/listener.ora.keqsi2
# Generated by Oracle configuration tools.
LISTENER_KEQSI2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.53.1.237)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.53.1.238)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_KEQSI2 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/10gR2/db)
(PROGRAM = extproc)
)
)
檢查網路是否能拼通
[oracle@keqsi2 admin]$ hostname
keqsi2
[oracle@keqsi2 admin]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 keqsi2 localhost.localdomain localhost
127.0.0.1 localhost.localdomain localhost
172.18.20.1 keqsi1-priv
172.18.20.2 keqsi2-priv
10.53.1.230 keqsi1
10.53.1.237 keqsi1-vip
10.53.1.231 keqsi2
10.53.1.238 keqsi2-vip
[oracle@keqsi2 admin]$ ping keqsi1
PING keqsi1 (10.53.1.230) 56(84) bytes of data.
64 bytes from keqsi1 (10.53.1.230): icmp_seq=0 ttl=64 time=0.131 ms
64 bytes from keqsi1 (10.53.1.230): icmp_seq=1 ttl=64 time=0.125 ms
64 bytes from keqsi1 (10.53.1.230): icmp_seq=2 ttl=64 time=0.128 ms
64 bytes from keqsi1 (10.53.1.230): icmp_seq=3 ttl=64 time=0.125 ms
64 bytes from keqsi1 (10.53.1.230): icmp_seq=4 ttl=64 time=0.126 ms
64 bytes from keqsi1 (10.53.1.230): icmp_seq=5 ttl=64 time=0.125 ms
64 bytes from keqsi1 (10.53.1.230): icmp_seq=6 ttl=64 time=0.126 ms
--- keqsi1 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 5999ms
rtt min/avg/max/mdev = 0.125/0.126/0.131/0.012 ms, pipe 2
[oracle@keqsi2 admin]$ ping keqsi2
PING keqsi2 (10.53.1.231) 56(84) bytes of data.
64 bytes from keqsi2 (10.53.1.231): icmp_seq=0 ttl=64 time=0.024 ms
64 bytes from keqsi2 (10.53.1.231): icmp_seq=1 ttl=64 time=0.010 ms
64 bytes from keqsi2 (10.53.1.231): icmp_seq=2 ttl=64 time=0.015 ms
--- keqsi2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.010/0.016/0.024/0.006 ms, pipe 2
[oracle@keqsi2 admin]$ ping keqsi2-vip
PING keqsi2-vip (10.53.1.238) 56(84) bytes of data.
64 bytes from keqsi2-vip (10.53.1.238): icmp_seq=0 ttl=64 time=0.018 ms
64 bytes from keqsi2-vip (10.53.1.238): icmp_seq=1 ttl=64 time=0.011 ms
64 bytes from keqsi2-vip (10.53.1.238): icmp_seq=2 ttl=64 time=0.010 ms
64 bytes from keqsi2-vip (10.53.1.238): icmp_seq=3 ttl=64 time=0.009 ms
--- keqsi2-vip ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.009/0.012/0.018/0.003 ms, pipe 2
[oracle@keqsi2 admin]$ ping keqsi1-vip
PING keqsi1-vip (10.53.1.237) 56(84) bytes of data.
64 bytes from keqsi1-vip (10.53.1.237): icmp_seq=0 ttl=64 time=0.135 ms
64 bytes from keqsi1-vip (10.53.1.237): icmp_seq=1 ttl=64 time=0.129 ms
64 bytes from keqsi1-vip (10.53.1.237): icmp_seq=2 ttl=64 time=0.121 ms
--- keqsi1-vip ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.121/0.128/0.135/0.010 ms, pipe 2
經上面的命令檢查網路沒有問題
下面手功啟動listener還是報TNS-12545
[oracle@keqsi2 admin]$ srvctl start listener -n keqsi2
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 28-AUG-2013 08:26:14
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Copyright (c) 1991, 2007, Oracle. All rights reserved.
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Starting /u01/app/oracle/10gR2/db/bin/tnslsnr: please wait...
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:TNSLSNR for Linux: Version 10.2.0.4.0 - Production
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:System parameter file is /u01/app/oracle/10gR2/db/network/admin/listener.ora
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Log messages written to /u01/app/oracle/10gR2/db/network/log/listener_keqsi2.log
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.1.237)(PORT=1521)(IP=FIRST)))
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:TNS-12545: Connect failed because target host or object does not exist
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: TNS-12560: TNS:protocol adapter error
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: TNS-00515: Connect failed because target host or object does not exist
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: Linux Error: 99: Cannot assign requested address
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Listener failed to start. See the error message(s) above...
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 28-AUG-2013 08:26:14
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Copyright (c) 1991, 2007, Oracle. All rights reserved.
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.1.237)(PORT=1521)(IP=FIRST)))
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:TNS-12541: TNS:no listener
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: TNS-12560: TNS:protocol adapter error
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: TNS-00511: No listener
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: Linux Error: 111: Connection refused
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.1.238)(PORT=1521)(IP=FIRST)))
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr:TNS-12541: TNS:no listener
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: TNS-12560: TNS:protocol adapter error
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: TNS-00511: No listener
keqsi2:ora.keqsi2.LISTENER_KEQSI2.lsnr: Linux Error: 111: Connection refused
CRS-0215: Could not start resource 'ora.keqsi2.LISTENER_KEQSI2.lsnr'.
下面讓各個節點的監聽程式只監聽自己節點的vip
[oracle@keqsi2 admin]$ vi listener.ora
# listener.ora.keqsi2 Network Configuration File: /u01/app/oracle/10gR2/db/network/admin/listener.ora.keqsi2
# Generated by Oracle configuration tools.
LISTENER_KEQSI2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.53.1.238)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_KEQSI2 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/10gR2/db)
(PROGRAM = extproc)
)
)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"listener.ora" 19L, 474C written
[oracle@keqsi1 admin]$ vi listener.ora
# listener.ora.keqsi1 Network Configuration File: /u01/app/oracle/10gR2/db/network/admin/listener.ora.keqsi1
# Generated by Oracle configuration tools.
LISTENER_KEQSI1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.53.1.237)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_KEQSI1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/10gR2/db)
(PROGRAM = extproc)
)
)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"listener.ora" 19L, 473C written
啟動監聽程式正常
[oracle@keqsi2 admin]$ lsnrctl start LISTENER_KEQSI2
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 28-AUG-2013 08:42:17
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/10gR2/db/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /u01/app/oracle/10gR2/db/network/admin/listener.ora
Log messages written to /u01/app/oracle/10gR2/db/network/log/listener_keqsi2.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.53.1.238)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.1.238)(PORT=1521)(IP=FIRST)))
STATUS of the LISTENER
------------------------
Alias LISTENER_KEQSI2
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 28-AUG-2013 08:42:17
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/10gR2/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/10gR2/db/network/log/listener_keqsi2.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.53.1.238)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@keqsi1 admin]$ lsnrctl start LISTENER_KEQSI1
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 28-AUG-2013 08:37:08
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/10gR2/db/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /u01/app/oracle/10gR2/db/network/admin/listener.ora
Log messages written to /u01/app/oracle/10gR2/db/network/log/listener_keqsi1.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.53.1.237)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.1.237)(PORT=1521)(IP=FIRST)))
STATUS of the LISTENER
------------------------
Alias LISTENER_KEQSI1
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 28-AUG-2013 08:37:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/10gR2/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/10gR2/db/network/log/listener_keqsi1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.53.1.237)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@keqsi1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.keqjm.db application ONLINE ONLINE keqsi1
ora....m1.inst application ONLINE ONLINE keqsi1
ora....m2.inst application ONLINE ONLINE keqsi2
ora....orcl.cs application ONLINE ONLINE keqsi2
ora....jm1.srv application ONLINE ONLINE keqsi1
ora....jm2.srv application ONLINE ONLINE keqsi2
ora....SM1.asm application ONLINE ONLINE keqsi1
ora....I1.lsnr application ONLINE ONLINE keqsi1
ora.keqsi1.gsd application ONLINE ONLINE keqsi1
ora.keqsi1.ons application ONLINE ONLINE keqsi1
ora.keqsi1.vip application ONLINE ONLINE keqsi1
ora....SM2.asm application ONLINE ONLINE keqsi2
ora....I2.lsnr application ONLINE ONLINE keqsi2
ora.keqsi2.gsd application ONLINE ONLINE keqsi2
ora.keqsi2.ons application ONLINE ONLINE keqsi2
ora.keqsi2.vip application ONLINE ONLINE keqsi2
然後再重新啟動rac資料庫能正常啟動
[oracle@keqsi1 admin]$ crs_stop -all
Attempting to stop `ora.keqjm.orcl.keqjm1.srv` on member `keqsi1`
Attempting to stop `ora.keqsi1.gsd` on member `keqsi1`
Stop of `ora.keqjm.orcl.keqjm1.srv` on member `keqsi1` succeeded.
Attempting to stop `ora.keqjm.orcl.keqjm2.srv` on member `keqsi2`
Attempting to stop `ora.keqjm.db` on member `keqsi1`
Attempting to stop `ora.keqsi1.ons` on member `keqsi1`
Attempting to stop `ora.keqjm.orcl.cs` on member `keqsi2`
Attempting to stop `ora.keqsi2.gsd` on member `keqsi2`
Attempting to stop `ora.keqsi2.ons` on member `keqsi2`
Stop of `ora.keqjm.orcl.keqjm2.srv` on member `keqsi2` succeeded.
Stop of `ora.keqsi1.gsd` on member `keqsi1` succeeded.
Stop of `ora.keqsi1.ons` on member `keqsi1` succeeded.
Stop of `ora.keqsi2.gsd` on member `keqsi2` succeeded.
Stop of `ora.keqsi2.ons` on member `keqsi2` succeeded.
Stop of `ora.keqjm.orcl.cs` on member `keqsi2` succeeded.
Stop of `ora.keqjm.db` on member `keqsi1` succeeded.
`ora.keqjm.keqjm1.inst` is already OFFLINE.
`ora.keqjm.keqjm2.inst` is already OFFLINE.
Attempting to stop `ora.keqsi1.ASM1.asm` on member `keqsi1`
Attempting to stop `ora.keqsi2.ASM2.asm` on member `keqsi2`
Attempting to stop `ora.keqsi1.LISTENER_KEQSI1.lsnr` on member `keqsi1`
Attempting to stop `ora.keqsi2.LISTENER_KEQSI2.lsnr` on member `keqsi2`
Stop of `ora.keqsi2.LISTENER_KEQSI2.lsnr` on member `keqsi2` succeeded.
Attempting to stop `ora.keqsi2.vip` on member `keqsi2`
Stop of `ora.keqsi1.LISTENER_KEQSI1.lsnr` on member `keqsi1` succeeded.
Attempting to stop `ora.keqsi1.vip` on member `keqsi1`
Stop of `ora.keqsi2.vip` on member `keqsi2` succeeded.
Stop of `ora.keqsi1.ASM1.asm` on member `keqsi1` succeeded.
Stop of `ora.keqsi1.vip` on member `keqsi1` succeeded.
Stop of `ora.keqsi2.ASM2.asm` on member `keqsi2` succeeded.
CRS-0216: Could not stop resource 'ora.keqjm.keqjm1.inst'.
CRS-0216: Could not stop resource 'ora.keqjm.keqjm2.inst'.
[oracle@keqsi1 admin]$ crs_start -all
Attempting to start `ora.keqsi1.ASM1.asm` on member `keqsi1`
Attempting to start `ora.keqsi1.vip` on member `keqsi1`
Attempting to start `ora.keqsi2.ASM2.asm` on member `keqsi2`
Attempting to start `ora.keqsi2.vip` on member `keqsi2`
Start of `ora.keqsi1.vip` on member `keqsi1` succeeded.
Attempting to start `ora.keqsi1.LISTENER_KEQSI1.lsnr` on member `keqsi1`
Start of `ora.keqsi2.vip` on member `keqsi2` succeeded.
Attempting to start `ora.keqsi2.LISTENER_KEQSI2.lsnr` on member `keqsi2`
Start of `ora.keqsi1.LISTENER_KEQSI1.lsnr` on member `keqsi1` succeeded.
Start of `ora.keqsi2.LISTENER_KEQSI2.lsnr` on member `keqsi2` succeeded.
Start of `ora.keqsi1.ASM1.asm` on member `keqsi1` succeeded.
Attempting to start `ora.keqjm.keqjm1.inst` on member `keqsi1`
Start of `ora.keqsi2.ASM2.asm` on member `keqsi2` succeeded.
Attempting to start `ora.keqjm.keqjm2.inst` on member `keqsi2`
Start of `ora.keqjm.keqjm1.inst` on member `keqsi1` succeeded.
Start of `ora.keqjm.keqjm2.inst` on member `keqsi2` succeeded.
CRS-1002: Resource 'ora.keqsi1.ons' is already running on member 'keqsi1'
CRS-1002: Resource 'ora.keqsi2.ons' is already running on member 'keqsi2'
CRS-1002: Resource 'ora.keqjm.db' is already running on member 'keqsi2'
Attempting to start `ora.keqjm.orcl.cs` on member `keqsi2`
Attempting to start `ora.keqsi1.gsd` on member `keqsi1`
Attempting to start `ora.keqjm.orcl.keqjm1.srv` on member `keqsi1`
Attempting to start `ora.keqjm.orcl.keqjm2.srv` on member `keqsi2`
Attempting to start `ora.keqsi2.gsd` on member `keqsi2`
Start of `ora.keqjm.orcl.cs` on member `keqsi2` succeeded.
Start of `ora.keqjm.orcl.keqjm1.srv` on member `keqsi1` succeeded.
Start of `ora.keqsi1.gsd` on member `keqsi1` succeeded.
Start of `ora.keqjm.orcl.keqjm2.srv` on member `keqsi2` succeeded.
Start of `ora.keqsi2.gsd` on member `keqsi2` succeeded.
CRS-0223: Resource 'ora.keqjm.db' has placement error.
CRS-0223: Resource 'ora.keqsi1.ons' has placement error.
CRS-0223: Resource 'ora.keqsi2.ons' has placement error.
[oracle@keqsi1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.keqjm.db application ONLINE ONLINE keqsi2
ora....m1.inst application ONLINE ONLINE keqsi1
ora....m2.inst application ONLINE ONLINE keqsi2
ora....orcl.cs application ONLINE ONLINE keqsi2
ora....jm1.srv application ONLINE ONLINE keqsi1
ora....jm2.srv application ONLINE ONLINE keqsi2
ora....SM1.asm application ONLINE ONLINE keqsi1
ora....I1.lsnr application ONLINE ONLINE keqsi1
ora.keqsi1.gsd application ONLINE ONLINE keqsi1
ora.keqsi1.ons application ONLINE ONLINE keqsi1
ora.keqsi1.vip application ONLINE ONLINE keqsi1
ora....SM2.asm application ONLINE ONLINE keqsi2
ora....I2.lsnr application ONLINE ONLINE keqsi2
ora.keqsi2.gsd application ONLINE ONLINE keqsi2
ora.keqsi2.ons application ONLINE ONLINE keqsi2
ora.keqsi2.vip application ONLINE ONLINE keqsi2
[oracle@keqsi1 admin]$
修改資料庫中的初始化引數LOCAL_LISTENER和REMOTE_LISTENER
oracle@keqsi1 admin ]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Aug 28 00:26:39 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> ALTER SYSTEM
2 SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 10.53.1.237)(PORT = 1521))'
3 SID = 'keqsi1';
系統已更改。
SQL> ALTER SYSTEM
2 SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 10.53.1.238)(PORT = 1521))'
3 SID = 'keqsi2';
系統已更改。
SQL> ALTER SYSTEM
2 SET REMOTE_LISTENER = 'LISTENERS_KEQJM'
3 SID = '*';
系統已更改。
其中'LISTENERS_KEQJM'對應於tnsnames.ora中的LISTENERS_KEQJM
連線串,該引數用於rac的負載均衡
[oracle@keqsi1 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/10gR2/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
KEQJM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = keqjm)
)
)
KEQJM2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi2-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = keqjm)
(INSTANCE_NAME = keqjm2)
)
)
KEQJM1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi1-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = keqjm)
(INSTANCE_NAME = keqjm1)
)
)
LISTENERS_KEQJM =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi2-vip)(PORT = 1521))
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = keqsi2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
下面是測看各個節點只監聽自己的vip地址時透過remote_listener能不能實現
rac的負載均衡
在本機測試
[oracle@test admin]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Aug 28 00:31:45 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> conn test/test@keqsi
Connected.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
keqjm1
SQL>exit
[oracle@test admin]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Aug 28 00:31:45 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> conn test/test@keqsi
Connected.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
keqjm2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-769410/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle啟動兩個監聽Oracle
- oracle rac scan監聽更改埠號Oracle
- deleted事件監聽報錯delete事件
- 監聽 watch props物件屬性監聽 或深度監聽物件
- Oracle 11g RAC 監聽日常管理Oracle
- rac監聽不能動態註冊
- 時間監聽
- oracle靜態監聽Oracle
- JMS監聽Oracle AQOracle
- 啟動資料庫監聽資料庫
- Oracle dblink監聽問題Oracle
- 6、oracle網路(監聽)Oracle
- 模型deleted事件監聽報錯解析模型delete事件
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- 2.5.4. 測試Oracle net——2.5.4.1. 啟動監聽程式Oracle
- watch監聽
- 11g rac監聽配置解析
- 12C RAC 修改監聽埠
- localeStorage 當前標籤頁變化監聽不到,只能監聽不同標籤頁變化,自己寫方法監聽
- Oracle 監聽異常處理Oracle
- Oracle 建立非1521埠監聽Oracle
- Oracle 監聽投毒COST解決Oracle
- 監聽div滾動高度
- 監聽滑鼠事件事件
- jQuery事件監聽jQuery事件
- Flutter事件監聽Flutter事件
- 7、listener監聽
- springboot事件監聽Spring Boot事件
- js 監聽事件JS事件
- JavaScript 事件監聽JavaScript事件
- 如何在rac環境中增加監聽
- 在duplicate時,出現監聽BLOCKED的情況,導致監聽自動關閉BloC
- 【JS】在連續性監聽事件中,監聽當前狀態是否變化JS事件
- oracle監聽檔案listener.ora for 10g/11gOracle
- java鍵盤監聽之視窗監聽的實現Java
- Laravel 實時監聽列印 SQLLaravelSQL
- oracle監聽不到例項服務Oracle
- Vue3.0的遞迴監聽和非遞迴監聽Vue遞迴
- centos的監聽http小程式CentOSHTTP