This discussion is archived
6 Replies Latest reply: Nov 29, 2012 10:49 AM by 864103 RSS

direct connection

864103 Newbie
Currently Being Moderated
hi all ,

oracle 11g.2 rac with asm in rhel 5


i'm using direct connection but it failed please advice


Enter user-name: x/ip:port@service
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name: x/ip:port@service.domain
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:


SQL> show parameter service_names

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string service.domain
SQL>



tnsnames in server


MEDI =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = medi-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MEDI.FANOOS)
)
)


scan ip 120
vip ip is 130 and 131

all these ip not work


thanks
  • 1. Re: direct connection
    sb92075 Guru
    Currently Being Moderated
    861100 wrote:
    hi all ,

    oracle 11g.2 rac with asm in rhel 5


    i'm using direct connection but it failed please advice


    Enter user-name: x/ip:port@service
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified


    Enter user-name: x/ip:port@service.domain
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified


    Enter user-name:


    SQL> show parameter service_names

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    service_names string service.domain
    SQL>



    tnsnames in server


    MEDI =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = medi-scan)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = MEDI.FANOOS)
    )
    )


    scan ip 120
    vip ip is 130 and 131

    all these ip not work


    thanks
    ORA-12154 ALWAYS only occurs on SQL Client & no SQL*Net packets ever leave client system
    ORA-12154 NEVER involves the listener, the database itself or anything on the DB Server.
    ORA-12154 occurs when client requests a connection to some DB server system using some connection string.
    TNS-03505 is thrown by tnsping & is same error as ORA-12154 thrown by sqlplus or others.
    The lookup operation fails because the name provided can NOT be resolved to any remote DB.
    The analogous operation would be when you wanted to call somebody, but could not find their name in any phonebook.
    The most frequent cause for the ORA-12154 error is when the connection alias can not be found in tnsnames.ora.
    The lookup operation of the alias can be impacted by the contents of the sqlnet.ora file; specifically DOMAIN entry.
    TROUBLESHOOTING GUIDE: ORA-12154 & TNS-12154 TNS:could not resolve service name [ID 114085.1]
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/


    sqlplus username/password@MEDI
  • 2. Re: direct connection
    Niket Kumar Pro
    Currently Being Moderated
    you are using incorrect string....


    try this
    sqlplus username/password@MEDI    (MEDI IS YOUR tns entry so your database is identify by this.)
    in your case you are putting whole string in username which only take username so its incorrect.
  • 3. Re: direct connection
    864103 Newbie
    Currently Being Moderated
    thanks , but i want to use the easy connection without tns entery
    i install client and every think is fine vie user/pass@tns_entry
    now i need to use direct connection from server linux obonto .
    the below is inside sqlnet.ora
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    thanks
  • 4. Re: direct connection
    sb92075 Guru
    Currently Being Moderated
    861100 wrote:
    thanks , but i want to use the easy connection without tns entery
    i install client and every think is fine vie user/pass@tns_entry
    now i need to use direct connection from server linux obonto .
    the below is inside sqlnet.ora
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    thanks
    notice the single quote marks below

    sqlplus user1/pass1@'dbserver:1521/orcl_sid'
  • 5. Re: direct connection
    864103 Newbie
    Currently Being Moderated
    Enter user-name: user/pass@ip:1521/service-name
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor


    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    C:\Users\ahmed.adel>sqlplus

    SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 29 21:25:13 2012

    Copyright (c) 1982, 2010, Oracle. All rights reserved.

    Enter user-name: user/pass@'ip:1521/sid1 first node'
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor


    Enter user-name:


    LSNRCTL> services
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+ASM2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:30745 refused:0 state:ready
    LOCAL SERVER
    Service "MEDI.FANOOS" has 1 instance(s).
    Instance "MEDI2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:631216 refused:0 state:ready
    LOCAL SERVER
    Service "MEDIXDB.FANOOS" has 1 instance(s).
    Instance "MEDI2", status READY, has 1 handler(s) for this service.
  • 6. Re: direct connection
    864103 Newbie
    Currently Being Moderated
    i get it , thanks for all


    username/password@sales-server:1521/sales.us.acme.com

Legend

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