0

I have a Issue in Oracle I have made two database one for Demo and one for Dev for same mount point. When I connect with Demo this can be connected but when I try to connect with DEV its not able connect. I have given to add the listner details as given below but when I am tnsping with DEV its giving TNS 12541 error. I try to find out but not able to connect.

[oracle@CVM-1429 ~]$ sqlplus sys/sys as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sat Oct 8 18:11:55 2016

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, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name from v$database;

NAME
---------
CSMEC

SQL>

Some more information:

[oracle@CVM-1429 ~]$ ps -ef|grep pmon
oracle    1286     1  0 Oct07 ?        00:00:10 ora_pmon_CSDEV
oracle   17032     1  0 Sep27 ?        00:01:40 ora_pmon_CSMEC
oracle   30817 30328  0 18:12 pts/2    00:00:00 grep pmon
[oracle@CVM-1429 ~]$
[oracle@CVM-1429 admin]$ pwd
/u03/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin

The content of the listener.ora:

LISTENER=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=10.56.184.32)(PORT=1525))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
    ))
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=CSMEC)
      (ORACLE_HOME=/u03/oracle/app/oracle/product/12.1.0/dbhome_1/)
      (SID_NAME=CSMEC))
   ))

LISTENER1=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=10.56.184.32)(PORT=1530))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
    ))
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=CSMEC)
      (ORACLE_HOME=/u03/ORCDEV/oracle/app/oracle/product/12.1.0/dbhome_1/)
      (SID_NAME=CSDEV))
   ))

The tnsnames.ora:

# tnsnames.ora Network Configuration File: /u03/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

CSMEC =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.56.184.32)(PORT = 1525))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = CSMEC)
    )
  )

CSDEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.56.184.32)(PORT = 1530))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = CSDEV)
    )
  )

The result of the tnsping:

[oracle@CVM-1429 admin]$ tnsping CSDEV

TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 08-OCT-2016 18:20:18

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.56.184.32)(PORT = 1530)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = CSDEV)))
TNS-12541: TNS:no listener
0

1 Answer 1

1

I do not see any proof of the listener running.

This does not seem to be correct:

LISTENER1=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=10.56.184.32)(PORT=1530))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
    ))
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=CSMEC)
      (ORACLE_HOME=/u03/ORCDEV/oracle/app/oracle/product/12.1.0/dbhome_1/)
      (SID_NAME=CSDEV))
   ))

If you want static registration for LISTENER1, then use SID_LIST_LISTENER1. Your tns entry contains SERVICE_NAME=CSDEV, and you try to register the database with SERVICE_NAME=CSMEC (GLOBAL_DBNAME=CSMEC).

Fix the above and start the listener:

lsnrctl start listener1

Then try again.

5
  • Hello Sir, I did that but i got a error -
    – suhail
    Oct 9, 2016 at 23:21
  • [oracle@CVM-1429 admin]$ lsnrctl start listner1 LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 10-OCT-2016 04:48:38 Copyright (c) 1991, 2014, Oracle. All rights reserved. Starting /u03/oracle/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait...
    – suhail
    Oct 9, 2016 at 23:24
  • TNSLSNR for Linux: Version 12.1.0.2.0 - Production System parameter file is /u03/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora Log messages written to /u03/oracle/app/diag/tnslsnr/CVM-1429/listner1/alert/log.xml TNS-01151: Missing listener name, listner1, in LISTENER.ORA Listener failed to start. See the error message(s) above... [oracle@CVM-1429 admin]$ lsnrctl
    – suhail
    Oct 9, 2016 at 23:24
  • @suhail listener1 and not listner1. Oct 10, 2016 at 10:09
  • Why do you make life unnecessarily hard on yourself by trying to have two listeners? Burn this into your brain: One single listener, with the default name of LISTENER and the default port of 1521 is quite capable of - indeed was designed to - service multiple databases of multiple versions running from multiple homes. Also, you make it even more difficult to maintain by hard-coding the ip address.
    – EdStevens
    Oct 11, 2016 at 22:33

Your Answer

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

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