Wednesday, March 1, 2017

Setting listener.ora in Linux

To set up listener.ora file in linux follow these steps:

  • change directory to oracle folder then network and admin folders consequtively: 
    • cd /u01/oracle/product/11.2.0.4/db_1
    • cd network
    • cd admin
  • run su command enter password (needed to edit listener.ora). open listener.ora to edit in your favorite editor. I used gedit:
    • su
    • gedit listener.ora
  • configure listener.ora file (you need to set up HOST, PORT, ORACLE_HOME, SERVICE_NAME), here is a sample file configured for my needs:
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.201)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))    
    )
  )

SID_LIST_LISTENER = 
(SID_LIST = 
 (SID_DESC = 
(ORACLE_HOME = /u01/oracle/product/11.2.0.4/db_1/)
(SID_NAME = ORACLEVM)
(SERVICE_NAME = ORACLEVM)
(GLOBAL_NAME = ORACLEVM)
 ) 

ADR_BASE_LISTENER = /u01/oracle


  • stop ans start listener by using these commands:
    • lsnrctl stop
    • lsnrctl start

0 comments:

Post a Comment