2

I have two listners:
one is running on port 1521 another on 1531.
lsnrctl stat shows status of services running on port 1521 only.
How should I check whether the services running on port 1531 is proper or not.

Listner Entry:


    # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    ADMIN_RESTRICTIONS_LISTENER = ON

    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
        )
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (PROTOCOL_STACK =
            (PRESENTATION = GIOP)
            (SESSION = RAW)
          )
        )
      )

    ADR_BASE_LISTENER = C:\app\Administrator

    SID_LIST_PARIVARTAN =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = PARIVARTAN)
          (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (SID_NAME = PARIVARTAN)
        )
      )


    PARIVARTAN =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1531))
        )
      )

    ADR_BASE_PARIVARTAN = C:\app\Administrator


TNSNAMES Entry


    # tnsnames.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.

    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )

    PARIVARTAN =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1531))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = parivartan)
        )
      )

tns ping result:


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = 127.0.0.1)(PORT = 1531))) (CONNECT_DATA = (SERVICE_NAME = parivartan)))
    OK (10 msec)

4
  • Hang on - did you fix your database (I'm just looking at the other question you posted on the site)???
    – Philᵀᴹ
    Commented Dec 17, 2012 at 10:38
  • i have posted my tns entry file and listener file kindly check if there is something i have missed...
    – Sham
    Commented Dec 17, 2012 at 10:41
  • Did you fix your database?? dba.stackexchange.com/questions/30542/… You don't need a new listener to fix that.
    – Philᵀᴹ
    Commented Dec 17, 2012 at 10:43
  • that is fixed actually due to some protection issue i can not use 1521 port. that's why using 1531 port and getting this issue...
    – Sham
    Commented Dec 17, 2012 at 10:45

1 Answer 1

4

Run:

lsnrctl status LISTENERNAME

... where LISTENERNAME is the name of the listener that is listening on port 1531. You can get this name from your $ORACLE_HOME/network/admin/listener.ora file.

For example:

LISTENER1531 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1531))
      )
    )
  )

LISTENER1531 would be the listener name for the above listener.ora entry.

If you need to add databases to the listener, add an entry to the listener.ora, as follows:

SID_LIST_LISTENER1531 =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = YOURDB)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (PROGRAM = extproc)
      (SID_NAME = YOURDB)
    )
  )

Obviously you'll need to add your own database and listener names & change the path to your $ORACLE_HOME.

You can reload the listener config with:

lsnrctl reload LISTENER1531

The above works fine for me with a `tnsnames.ora as follows:

YOURDB =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(Host = node1)(Port = 1531))
   )
 (CONNECT_DATA =
   (SERVICE_NAME = YOURDB)
 )
)
9
  • Following is the response: Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1531))) The listener supports no services The command completed successfully. Although i have service name in tns file
    – Sham
    Commented Dec 17, 2012 at 10:05
  • Have you got a SID_LIST_<YOURLISTENERNAME> = entry in your listener.ora? If not, make one or use netca to help you do so. I've edited the answer with help.
    – Philᵀᴹ
    Commented Dec 17, 2012 at 10:12
  • no i don't have such entry. will u provide me the sample entry for the same
    – Sham
    Commented Dec 17, 2012 at 10:16
  • See edited answer.
    – Philᵀᴹ
    Commented Dec 17, 2012 at 10:17
  • Now lsnrctl show's the status as UNKNOWN. also when i try to connect it gives me following error: ORA-28547: connection to server failed, probable Oracle Net admin error
    – Sham
    Commented Dec 17, 2012 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.