- client-side connect-time load balancing
SOESRV2=
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.81)(PORT=1531))
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.82)(PORT=1531))
)
(CONNECT_DATA=(SERVICE_NAME=rac))
)
C:\app\client\varunyadav\product\12.1.0\client_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.81)(PORT=1531)) (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.82)(PORT=1531))) (CONNECT_DATA=(SERVICE_NAME=rac)))
OK (20 msec)
C:\Users\varunyadav> sqlplus sys/system123@soesrv2 as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 5 17:17:34 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> SELECT SYS_CONTEXT('USERENV','SERVICE_NAME') FROM DUAL;
SYS_CONTEXT('USERENV','SERVICE_NAME')
--------------------------------------------------------------------------------
rac
SQL> SELECT INSTANCE_NAME FROM V$INSTANCE;
INSTANCE_NAME
----------------
rac2
By Default Load balancing is done on both server internally, If one database sid is stop due any cause of failure it will automatically move to another server
SQL>
SQL> SELECT INST_ID, COUNT(*) FROM GV$SESSION GROUP BY INST_ID ORDER BY INST_ID;
INST_ID COUNT(*)
---------- ----------
1 57
2 58
SQL>
No comments:
Post a Comment