Thursday, April 05, 2018

How To Force Listener To Rigster a DB

Requirement: 

 Sometimes we need to register DB to different listeners which have different ports.
 The loca_listener parameter in init<db>.ora normally let you register 1 listener only.

  Example :
    testdb is registered in listener_1533 via init<db>.ora file, we need to register testdb into listener_1521 as well


Solution:

  We need to edit the listener.ora and manually add the sid and dbhome  . The listener service  would be shown as "status UNKNOWN". It does not matter as client still can connect to it

Example
LISTENER_1521 =
 (DESCRIPTION_LIST =
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)
   (HOST = test-vip)
   (PORT = 1521)(IP = FIRST))))

SID_LIST_LISTENER_1521 =
  (SID_LIST =
    (SID_DESC =
      (SDU = 32768)
      (GLOBAL_DBNAME = testdb)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/dbhome_2)
      (SID_NAME = testdb1)
    )



   (SID_DESC =
      (SDU = 32768)
      (GLOBAL_DBNAME = testhr)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/dbhome_2)
      (SID_NAME = testhr1)
   )

)

No comments: