DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: ORA-12154 error

  1. #1
    Join Date
    Dec 1999
    Posts
    217

    ORA-12154 error

    I have created a new database on a UNIX server. The problem I am having is connecting to the database via the connect string. WHen I set up the environment to my new database and type the command:

    sqlplus system/password

    it connects me to the database.
    But when I type:

    sqlplus system/password$ORACLE_SID

    I get the follwoing error.

    Error:
    ORA-12154: TNS:could not resolve service name.

    WHat am I missing?

    Your input is highly appreciated.
    Chintz

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    no tnsnames defined

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    sqlplus system/password@ORCL
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  4. #4
    Join Date
    Dec 1999
    Posts
    217
    The tnsnames is defined. I cann make a connectiont from the server where this database is installed, but that is only by setting the ORACLE_SID to that database. I cannot connect to the server using the databse name in a connect string. Alos, I am able to bring up the listener for that server.
    Is it something to do with the sqlnet.ora file?

    The tnsnames entry is as follows:
    PRODA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = hpmain)
    (PORT = 3395)
    )
    )
    (CONNECT_DATA =
    (SID = PRODA)
    )
    )

    Another thisn, when I run the command
    tnsping PRODA

    The system hangs after spitting this out:
    TNS Ping Utility for HPUX: Version 9.2.0.4.0 - Production on 22-MAY-2005 12:22:30

    Copyright (c) 1997 Oracle Corporation. All rights reserved.

    Used parameter files:
    /var/opt/oracle/sqlnet.ora


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = hpmain) (PORT = 3395))) (CONNECT_DATA = (SID = PRODA))


    Any suggestions?
    Chintz
    Last edited by Chintz; 05-22-2005 at 12:25 PM.

  5. #5
    Join Date
    Dec 1999
    Posts
    217
    Thanks for all your input. I managed to fix the issue. The problem was that I was missing a closing parenthesis in the ORACLE_SID entry in the tnsnames.ora file.

    Chintz

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