ORACLE 11g rac Listener Configuration (instance sharing) after a user RAC installed on QQ last two days, how to configure the listener? Below I will share an instance Environment Information
cat /etc/hosts192.168.1.11 racdb1 192.168.2.2 racdb1-priv 192.168.1.12 racdb1-vip 192.168.1.13 racdb2 192.168.2.3 racdb2-priv 192.168.1.14 racdb2-vip 192.168.1.15 scan-db
Add in tnsnames. ora
LISTENER_RACDB1,LISTENER_RACDB2,SCANvi tnsnames.ora LISTENER_RACDB1 = (ADDRESS = (PROTOCOL = TCP)(HOST = racdb1-vip)(PORT = 1521))LISTENER_RACDB2 = (ADDRESS = (PROTOCOL = TCP)(HOST = racdb2-vip)(PORT = 1521))SCAN = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scan-db)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = db) ) )su - oracleSQL>alter system set local_listener='LISTENER_RACDB1:1521',sid='db1'; SQL>alter system set local_listener='LISTENER_RACDB2:1521',sid='db2';SQL> alter system set remote_listener='racscan:1521'; SQL> alter system register;
Client Connection in two ways
TNS vip connection mode RAC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.12) (PORT = 1521) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.14) (PORT = 1521) (LOAD_BALANCE = ON) (FAILOVER = ON) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = db ))) tns racscan connection tns vip SCAN = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = racscan) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = db )))