- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-3-7 00:30:19
具体测试了一下 发现 client 用 VIP failover(非SCAN-VIP) 还是有问题
ODM TEST:
[grid@vrh2 ~]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]
[oracle@vrh1 ~]$ srvctl config scan
SCAN name: vrh-cluster-scan, Network: 1/192.168.1.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /vrh-cluster-scan/192.168.1.200
[grid@vrh1 ~]$ srvctl config nodeapps
Network exists: 1/192.168.1.0/255.255.255.0/eth0, type static
VIP exists: /vrh1-vip/192.168.1.162/192.168.1.0/255.255.255.0/eth0, hosting node vrh1
VIP exists: /vrh2-vip/192.168.1.164/192.168.1.0/255.255.255.0/eth0, hosting node vrh2
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
[grid@vrh2 ~]$ crsctl status res ora.vprod.db
NAME=ora.vprod.db
TYPE=ora.database.type
TARGET=OFFLINE, ONLINE
STATE=OFFLINE, ONLINE on vrh2
Only Vrh2 has an open instance , another instance has been closed.
SCAN_FAILOVER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vrh-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = VPROD)
)
)
VIP_FAILOVER=
(DESCRIPTION =
(ADDRESS_LIST =
(failover= on)
(ADDRESS = (PROTOCOL = TCP)(HOST = vrh1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = vrh2-vip)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = VPROD)
)
)
[oracle@vrh1 admin]$ tnsping SCAN_FAILOVER
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 07-MAR-2012 03:29:38
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vrh-cluster-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = VPROD)))
OK (0 msec)
[oracle@vrh1 admin]$ tnsping VIP_FAILOVER
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 07-MAR-2012 03:29:42
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (failover= on) (ADDRESS = (PROTOCOL = TCP)(HOST = vrh1-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vrh2-vip)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = VPROD)))
OK (10 msec)
[oracle@vrh1 admin]$ cat loop1.sh
nohup sqlplus su/su@SCAN_FAILOVER @verify.sql &
sleep 1
nohup sqlplus su/su@SCAN_FAILOVER @verify.sql &
sleep 1
nohup sqlplus su/su@SCAN_FAILOVER @verify.sql &
sleep 1
nohup sqlplus su/su@SCAN_FAILOVER @verify.sql &
sleep 1
loop1.sh failover using SCAN_FAILOVER
[oracle@vrh1 admin]$ cat nohup.out
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:33:40 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SID SERIAL# FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER
---- -------- ------------- --------------- -----------
197 12141 NONE NONE NO
INSTANCE_NAME
----------------
VPROD2
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:33:41 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SID SERIAL# FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER
---- -------- ------------- --------------- -----------
197 12147 NONE NONE NO
INSTANCE_NAME
----------------
VPROD2
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:33:42 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SID SERIAL# FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER
---- -------- ------------- --------------- -----------
197 12153 NONE NONE NO
INSTANCE_NAME
----------------
VPROD2
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:33:43 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SID SERIAL# FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER
---- -------- ------------- --------------- -----------
192 10629 NONE NONE NO
INSTANCE_NAME
----------------
VPROD2
loop2 failover using VIP_FAILOVER
[oracle@vrh1 admin]$ cat loop2.sh
nohup sqlplus su/su@VIP_FAILOVER @verify.sql &
sleep 1
nohup sqlplus su/su@VIP_FAILOVER @verify.sql &
sleep 1
nohup sqlplus su/su@VIP_FAILOVER @verify.sql &
sleep 1
nohup sqlplus su/su@VIP_FAILOVER @verify.sql &
sleep 1
[oracle@vrh1 admin]$ ./loop2.sh
[oracle@vrh1 admin]$ cat nohup.out
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:35:34 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
Enter user-name:
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:35:35 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
Enter user-name:
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:35:36 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
Enter user-name:
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 03:35:37 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0 |
|