This discussion is archived
9 Replies Latest reply: Nov 22, 2011 1:11 AM by 839439 RSS

TNS-3505 after rename the hostname

user12155310 Newbie
Currently Being Moderated
Hi,

on Win7 32Bit I used a 11gR1 DB and it worked fine.

I had to rename the hostname of the workstation and corrected the new hostname in the listener.ora and tnsnames.ora.

Now I cannot connect or get a tnsping: I am getting TNS-03505,

in the \diag\tnslsnr there is the new hostname folder of the listener.

Is there a solution for this problem ?

Many thanks.
  • 1. Re: TNS-3505 after rename the hostname
    Oviwan Pro
    Currently Being Moderated
    paste tnsnames.ora, listener.ora, sqlnet.ora and tnsping command
  • 2. Re: TNS-3505 after rename the hostname
    user12155310 Newbie
    Currently Being Moderated
    Hi,

    thanks for your reply.

    sqlnet.ora:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    
    trace_level_client = 16
    trace_file_client = cli.trc
    trace_directory_client = C:\temp
    log_file_client = sqlnet.log
    log_directory_client = C:\temp
    tnsnames.ora
    DB11G3 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myPC)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = db11g3)
        )
      )
    
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
        )
      )
    
    RSERVER =
      (ADDRESS=
        (PROTOCOL=tcp)
        (HOST=localhost)
        (PORT=1949)
      )
    listener.ora
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = D:\Oracle11gDB_3\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:D:\Oracle11gDB_3\product\11.2.0\dbhome_1\bin\oraclr11.dll")
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST =myPC)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = D:\Oracle11gDB_3
     tnsping db11g3
    
    => TNS-3505
    Many thanks.
  • 3. Re: TNS-3505 after rename the hostname
    Oviwan Pro
    Currently Being Moderated
    also output of "lsnrctl status" and tnsping
  • 4. Re: TNS-3505 after rename the hostname
    sb92075 Guru
    Currently Being Moderated
    TNS-3505 error
    is the same as
    ORA-12154: TNS:could not resolve the connect identifier specified

    which means that the alias (@DB11G3) could not be found & resolved.
    The connection request never start & NEVER left the client system.
    oracle@bcm-laptop:~$ tnsping db11g3
    
    TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 21-NOV-2011 16:20:18
    
    Copyright (c) 1997, 2009, Oracle.  All rights reserved.
    
    Used parameter files:
    /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
    
    TNS-03505: Failed to resolve name
    oracle@bcm-laptop:~$ sqlplus scott/tiger@db11g3
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 21 16:20:40 2011
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
  • 5. Re: TNS-3505 after rename the hostname
    900442 Explorer
    Currently Being Moderated
    Hi,
    Can try the following:
    SQLNET.AUTHENTICATION_SERVICES=(NONE)
    Adding the entry for db11g3 in listener.ora and restarting the listener.

    Thanks and Regards,
    Rajesh K.
  • 6. Re: TNS-3505 after rename the hostname
    EdStevens Guru
    Currently Being Moderated
    Oviwan wrote:
    also output of "lsnrctl status" and tnsping
    a 3505 never got out of the client, so anything having to do with the listener is a red herring.
  • 7. Re: TNS-3505 after rename the hostname
    EdStevens Guru
    Currently Being Moderated
    rajkeshav wrote:
    Hi,
    Can try the following:
    SQLNET.AUTHENTICATION_SERVICES=(NONE)
    Adding the entry for db11g3 in listener.ora and restarting the listener.
    BZZZZTTTT!!!!!

    The request never left the client. It never got to the listener. Any time spent on the listener when dealing with a ora-03535 (and ora-12154, which is exactly the same error) is a waste of time.
    Thanks and Regards,
    Rajesh K.
  • 8. Re: TNS-3505 after rename the hostname
    EdStevens Guru
    Currently Being Moderated
    user12155310 wrote:
    Hi,

    on Win7 32Bit I used a 11gR1 DB and it worked fine.

    I had to rename the hostname of the workstation and corrected the new hostname in the listener.ora and tnsnames.ora.

    Now I cannot connect or get a tnsping: I am getting TNS-03505,

    in the \diag\tnslsnr there is the new hostname folder of the listener.

    Is there a solution for this problem ?

    Many thanks.
    IN spite of what others are telling you, looking at the listener is a total, complete waste of time for this error.

    Please read http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/
    See if the third paragraph ("Hardly a day goes by ....") doesn't sound like this thread.
  • 9. Re: TNS-3505 after rename the hostname
    839439 Pro
    Currently Being Moderated
    I had to rename the hostname of the workstation and corrected the new hostname in the listener.ora and tnsnames.ora.
    First you have conform that the host name is finally set or not. Fire the below command to check

    C:\> set

    If not change reboot the system and try connect it again ..

    Hope this help you

    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points