Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.6K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.9K SQL & PL/SQL
- 21.3K SQL Developer
- 295.4K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 395 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
ORA-12154 Windows 7 32bit ORACLE 11g ODBC Driver CONNECT
Hi All,
I'm having problems connecting to extenal database using Oracle ODBC driver for Windows 7 32bit .
I have downloaded the instantclient odbc nt 11.2.0.4zip drivers for 32-bit and unpacked it
and run the installer and choose the default location ie c:\app\product\11.2.0\client_1
2.I done all the necessary setting ie set the Path and creating new user variable for tns admin
in the system environment and modified the hostfile on etc sys32 and copied both tsnamesn and sqlnet
to Network\Admin file
3.I then started the Data Sources (ODBC) manager, configured the driver and tested the
configuration then I got a testing connection error SQLstate= 08004... ORA-12154 TNS couldn't connect.
could you please help. Thanks in advance.
Answers
-
Hi,
For accessing tnsnames,ora in Network\Admin directory, Oracle ODBC driver requires Admin privilege.
So make sure you start ODBC Data Source manager with Admin privilege (ie right click on top of ODBC Data Source manager and select "Run as Administrator").
Thanks,
Senthil
-
Hi Senthil,
Thanks for your reply. I tried with all admin rights but I got the same error. Could it to do with that I have two tnsnames files belong to two different applications? here is more info about what I am doing; I am trying to migrate old XP programes into win 7. The old ODBC manager was using the old MS ODBC for Oracle to connect to the Database to view excel in office 10 and now this an Oracle ODBC driver to access a Database to view excel in Office 13.
-
I couldn't understand why you need two different tnsnames files. Are they resides in two different directories with filename "tnsnames.ora"? In that case, you need to set the TNS_ADMIN appropriately.
If you haven't named tnsnames files as "tnsnames.ora", then Oracle ODBC driver may not able to access it.
Also if TNS_ADMIN env variable is not pointed to the correct directory where tnsnames.ora file resides, then Oracle ODBC driver won't be able to access it.
In any case, if Oracle ODBC driver unable to access the tnsnames.ora and there is no connection string value stored in the Windows registry, then it throws ORA-12154 error.
Thanks,
Senthil
-
Thanks Senthil,
Yes I have two tnsnames.ora in two different directories and I have set both the PATH and the User env to point to the tnsnames.ora in Admin folder eg %OraClient11g_home1%\app\product\client_1\Network\Admin\tnsnames.ora. I need the two applications for different database access proposes.
-
Have you set TNS_ADMIN environment variable? TNS_ADMIN should point to only one directory.
-
Yes, as I mentioned above: I created new variable name TNS_ADMIN (for the new ODBC driver) in the user environment and set it to the variable value to %OraClient11g_home1%\app\product\client_1\Network\Admin\tnsnames.ora.
-
Directory path is sufficient. You shouldn't include 'tnsnames.ora' in that variable's(TNS_ADMIN) value.
-
I removed 'tnsnames.ora' from the path but still have the error!
-
Are you able to connect to your database through SQL*Plus with your current configuration?
-
No, SQL*Plus ask for a password and when I tried I also got an error ora12203 unable to connect to destination.