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

Thread: Not able to connect Oracle through Sqlplus

  1. #1
    Join Date
    May 2007
    Posts
    1

    Not able to connect Oracle through Sqlplus

    Hi Everyone,

    One of My friend is installed oracle 9i in my System.I am not able to connect oracle through sqlplus(scott/tiger@oracle).I am getting an error

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

    Note: I could not find the listner.ora in My system

    Please find the Below tnsnames.ora

    -----------------------------------------

    # This file contains the syntax information for
    # the entries to be put in any tnsnames.ora file
    # The entries in this file are need based.
    # There are no defaults for entries in this file
    # that Sqlnet/Net3 use that need to be overridden
    #
    # Typically you could have two tnsnames.ora files
    # in the system, one that is set for the entire system
    # and is called the system tnsnames.ora file, and a
    # second file that is used by each user locally so that
    # he can override the definitions dictated by the system
    # tnsnames.ora file.

    # The entries in tnsnames.ora are an alternative to using
    # the names server with the onames adapter.
    # They are a collection of aliases for the addresses that
    # the listener(s) is(are) listening for a database or
    # several databases.

    # The following is the general syntax for any entry in
    # a tnsnames.ora file. There could be several such entries
    # tailored to the user's needs.

    = [ (DESCRIPTION_LIST = # Optional depending on whether u have
    # one or more descriptions
    # If there is just one description, unnecessary ]
    (DESCRIPTION=
    [ (SDU=2048) ] # Optional, defaults to 2048
    # Can take values between 512 and 32K
    [ (ADDRESS_LIST= # Optional depending on whether u have
    # one or more addresses
    # If there is just one address, unnecessary ]
    (ADDRESS=
    [ (COMMUNITY=) ]
    (PROTOCOL=tcp)
    (HOST=)
    (PORT=)
    )
    [ (ADDRESS=
    (PROTOCOL=ipc)
    (KEY=)
    )
    ]
    [ (ADDRESS=
    [ (COMMUNITY=) ]
    (PROTOCOL=decnet)
    (NODE=)
    (OBJECT=)
    )
    ]
    ... # More addresses
    [ ) ] # Optional depending on whether ADDRESS_LIST is used or not
    [ (CONNECT_DATA=
    (SID=)
    [ (GLOBAL_NAME=) ]
    )
    ]
    [ (SOURCE_ROUTE=yes) ]
    )
    (DESCRIPTION=
    [ (SDU=2048) ] # Optional, defaults to 2048
    # Can take values between 512 and 32K
    [ (ADDRESS_LIST= ] # Optional depending on whether u have more
    # than one address or not
    # If there is just one address, unnecessary
    (ADDRESS
    [ (COMMUNITY=) ]
    (PROTOCOL=tcp)
    (HOST=)
    (PORT=)
    )
    [ (ADDRESS=
    (PROTOCOL=ipc)
    (KEY=)
    )
    ]
    ... # More addresses
    [ ) ] # Optional depending on whether ADDRESS_LIST
    # is being used
    [ (CONNECT_DATA=
    (SID=)
    [ (GLOBAL_NAME=) ]
    )
    ]
    [ (SOURCE_ROUTE=yes) ]
    )
    [ (CONNECT_DATA=
    (SID=)
    [ (GLOBAL_NAME=) ]
    )
    ]
    ... # More descriptions
    [ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
    ----------------------------------------------------------------------

    Please help me out in this regard.

    Thanks in Advance
    Kumar

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    thats not your tnsname file, thats the sample one with nothing in

    you need to configure your tnsnames.ora file

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