Forum Stats

  • 3,816,055 Users
  • 2,259,134 Discussions
  • 7,893,374 Comments

Discussions

odbc connection error

2686597
2686597 Member Posts: 14
edited May 5, 2015 8:56AM in ODBC

Hi,

I have installed oracle 11.2 in RHEL 6.3 and tried to add odbc connection from windows 2012 std r2 server. I am getting below error.

Unable to connect

SQLState=08004

[Oracle][ODBC][Ora]ORA-12154:TNS:could not resolve the connect identifier specifed

My tnsping outpu

[[email protected] ~]$ tnsping orcl

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 02-MAY-2015 08:44:52

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:

/u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Vcenter-DB)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.asicdesigners.com)))

OK (0 msec)

My tnsnames file in windows 2012

LISTENER =

   (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Vcenter-DB.asicdesigners.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

below is sceenshot how i am trying

pastedImage_0.png

Let know any inputs required.

Thanks,

Vidya Sagar

Answers

  • Unknown
    edited May 1, 2015 11:56PM

    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/

  • abhinivesh.jain
    abhinivesh.jain Member Posts: 307 Blue Ribbon
    edited May 2, 2015 4:33AM

    For tnsping you have used orcl whereas for ODBC setup you have given orcl.asicdesigners.com, this might be causing the issue. 

    Please do the following.

    1. For ODBC setup use orcl as service name

    2. do tnsping using orcl.asicdesigners.com and share the output

    Thanks,

    Abhi

  • 2686597
    2686597 Member Posts: 14
    edited May 4, 2015 12:29AM

    Hi,

    I tried both but still same error. Please help me

  • abhinivesh.jain
    abhinivesh.jain Member Posts: 307 Blue Ribbon
    edited May 4, 2015 2:46AM

    Do you have more than one ORACLE_HOME installed? Please send the output of following. Also provide the output of sqlnet.ora

    tnsping orcl.asicdesigners.com

  • svenkatn-Oracle
    svenkatn-Oracle Member Posts: 74 Employee
    edited May 5, 2015 5:29AM

    Hi,

    Please check if you are able to connect to the Oracle DB from SQL*PLUS utility from your client machine.

    If yes, please check the TNSADMIN has been set.

    I understand that, you have installed Oracle Client 11.2.0.1 on Windows 2012 Server. Please confirm.

    Please note that, Oracle Client 11.2.0.1 is not certified on Windows 2012. Minimum version supported is Oracle Client 11.2.0.4.0

    thanks and regards

    Venkat

  • Unknown
    edited May 5, 2015 8:56AM

    >My tnsping outpu

    >[[email protected] ~]$ tnsping orcl

    above was done from RHEL system & proves NOTHING.

    It must succeed from Windows system to provide meaningful debugging information

This discussion has been closed.