DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: ORA-12154

  1. #1
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    Hi,

    How can I solve this "ORA-12154 could not resolve service name" error? when connecting
    sqlplus system/manager@devt1

    I already tried to follow the METALINK suggestions but it still persist.

    I can ping the server (ping linux_svr).
    S.O.S. please.

    O.S. Linux 7.0
    DB Ora 8.1.7

    listener.ora
    -------------
    DEVT1.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = linux_svr)
    (PORT = 1521))
    )
    (CONNECT_DATA = (SID = DEV))
    )

    sqlnet.ora
    ------------
    NAMES.DEFAULT_DOMAIN = WORLD

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Show us the TNSNAMES.ORA

  3. #3
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    Hi,

    Sorry, that's the tnsnames.ora (labeled as listener.ora)

  4. #4
    Join Date
    Nov 2001
    Location
    Bangalore
    Posts
    41
    If you are accessing from client machine (windows) or linux.
    then make a service entry in your tnsnames.ora.
    it will be located at C:\orant\network\admin or find for tnsnames.ora if it is in linux usually will be there at
    $ORACLE_HOME/network/admin/tnsnames.ora
    open the file and make the entry for your service.
    if u r on server check the status of listener.
    to fin out the host address and port number of ur service
    give tnsping < service name>

    and in sqlnet.ora please delete or comment all the lines except defaul_domain.



    cheers


    san

  5. #5
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    As long as your tnsnames.ora is correct this prolem can occur due to one of 3 reasons :

    Have you checked whether the Oracle instance is running.
    Log on to sever and ensure database is open.

    Ensure that tnsnames and sqlnet are in default directory, otherwise set tns_admin environment variable.

    Ensure that the sid is specified in listener.ora and listener is started.



    you can also try settting up your connection through net8 assistant and test to ensure that your configuration files are set up correctly.

    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  6. #6
    Join Date
    Oct 2001
    Posts
    83
    Hello,

    You can also use the command :

    tnsping service_name

    in order to check that the tnsnames.ora are configured and the listener is started.

    So if the listener in not started, you will have the following message : TNS-12541 (listener not started).

    Be careful, tnsping will not let you if your instance is started or not...

    Hope this helps


  7. #7
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    Hi,

    I issued tsnping linux_svr, and this is the result

    ....attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=linux_svr)(PORT=1521)) OK (0 msec)

    But I still can not connect....need further assistance pls.

  8. #8
    Join Date
    Oct 2000
    Location
    Halifax, Nova Scotia
    Posts
    197
    Do tnsping DEVT1.
    Don't be afraid to try something new. Amateurs built the Ark, professionals built the Titanic

  9. #9
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    Hi,

    tnsping devt1

    tns-03505: failed to resolve name

    ....what's next?

  10. #10
    Join Date
    Nov 2001
    Location
    Bangalore
    Posts
    41
    go to the server where ur database is residing.

    u said that ur database is in linux.

    then give this command.

    ps -ef | grep smon.
    it will show the bg process and easily u can make out how many databases are running.

    if u have more than one database then check for listener entry for both.

    u can do lsnrctl status.
    if u don't have then make the listener entry and start the listener again.
    from this u can take the service name, port number and hostname and make the entry n tnsnames.ora

    then it will work fine.

    san

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width