Thanks for your support.

I asked a question because I was having trouble with the title in the ORACLE DB connection. The details are as follows.

About the current state and the measures taken

I am trying to connect by referring to tnsname.ora with ODBC connection of VBA.

The directory structure of ORACLE_HOME is C: \ oracle \ product \ 11.2.0 \ client_1 \ network \ admin
No particular irregular location is specified.
Also, the environment variables for ORACLE_HOME have been set.
I specified the wrong path once in the environment variable settings, and an error saying "fatal error" occurred.
Corrected the path and tried after rebooting, "ORA-12154: TNS: Could not resolve the specified connection identifier (TNS-12154)"
It seems that the path of the environment variable is in the path and the correct tnsnames.ora file can be referenced because of the error confirmed.

Comparison with other PCs

Actually, the event that is occurring this time is not occurring on my PC but on another PC.
Even in my case, the directory structure of ORACLE_HOME and the contents of tnsnames.ora and sqlnet.ora are the same.
However, it is unlikely that the tool or file contents are inadequate in order for the tool to work properly on my terminal.

what I want to know

(1) How to check the path that refers to tnsnames.ora (I also checked% ORACLE_HOME% etc. at the command prompt, but there seems to be no problem with the displayed path)
(2) Is there a way to explicitly set tnsnames.ora in addition to the ORACLE_HOME environment variable? (I checked the TNS_ADMIN environment variable, but there was no description even when I checked the setting method.)
③ Other useful check items and solutions

If i find any insufficiency in the above information, please let us know at any time.
We apologize for the inconvenience, but we would appreciate it if you could answer if you have any knowledge.

That's it. Thank you.

Addition of tnsnames.ora and sqlnet.ora

The contents of both files are described below as pointed out by Orlofsky. (Confidential items will be hidden.)

# sqlnet.ora Network Configuration File: C: \ oracle \ product \ 11.2.0 \ client_1 \ network \ admin \ sqlnet.ora
#Generated by Oracle configuration tools.
#This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
#authentication, they will not be able to connect to the database on NT.
# tnsnames.ora Network Configuration File: C: \ oracle \ product \ 10.2.0 \ client_1 \ network \ admin \ tnsnames.ora
#Generated by Oracle configuration tools.
xxx_DEV =
      (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = xxxx))
  • Answer # 1

    Thank you to those who answered.
    This has been resolved and details are described below.
    In addition to the communication test to the endpoint, tnsping of the Oracle utility taught by sazi
    If you specify an identifier name, you can try to connect using the property file (tnsnames.ora, sqlnet.ora).
    was. By using this, the path that refers to the property file will be displayed.
    Therefore, when using tnsping with the identifier name specified, it turned out that it refers to the property file under a directory different from the installed ORACLE_HOME.
    By listing the connection identifier there, you can connect to the instance without any problems.

    I got an answer

    Thank you very much.

  • Answer # 2

    Can I connect to Oracle Database with SQL * Plus?

    Is the environment supported by Oracle Database Matrix for both Oracle Database and Oracle Client?

    If it's a supported combination, why not add tnsnames.ora, sqlnet.ora to the question in [code] at https://stackoverflow.com/help/question-tips#questionTips3-7? Hide the IP address as xxx.xxx.xxx.xxx.


    Windows Home Premium is not supported by Oracle Database. Oracle 11.2 does not support Windows 10 either.

  • Answer # 3

    It seems that you understand this area (tnsnames.ora file), so please check the communication with TNSPING.
    * At the link destinationlsnrctl statusPlease go while checking the contents of tnsnames.ora using such as.