ORA-12542: TNS:address already in use – Oracle 10g 64 bit

My one of the client facing ORA-12542, this error message popped up when he tried TNSPING OR to create DB-link.
Environment:
Microsoft Windows Server 2003 – 64 bit
Oracle Database 10g Enterprise Edition Release 10.2.0.4 – 64 bit

Error:

ORA-12542: TNS:address already in use

Solution:

On server side, add multiple TCP ports in listener.ora file, I have added additional TCP port i.e.1523 to the current LISTENER.

D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
INBOUND_CONNECT_TIMEOUT_LISTENER = 0
SID_LIST_LISTENER =
   (SID_LIST =
      (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
   )
 )
LOG_DIRECTORY_LISTENER = G:\Listener_Trace
LISTENER =
   (DESCRIPTION_LIST =
     (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP)(HOST = newpass)(PORT = 1521))
       (ADDRESS = (PROTOCOL = TCP)(HOST = newpass)(PORT = 1523))
     )
   )

And on client side, map net service names to recently added listener protocol address. i.e. 1523, as below:

NEWPASS_29 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.6)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.6)(PORT = 1523))
   )
  (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = NEWPASS) 
  )
)

after made above changes to listener.ora and tnsnames.ora, TNSPING was successful and able to create DB-link.

Note:

You may face mentioned error in following cases:

  1. New installation
  2. listener.ora file has been edited manually since the last listener restart
  3. TCP port number is duplicated across the list of ADDRESS configurations in the listener.ora file.

Cheers!!

Stay Tune. 🙂