0

I am experiencing a very strange issue when creating a Windows7 x32 ODBC to connect to Oracle 12c.
I keep getting this error when I click the "Test Connect" button in the Windows ODBC Applet "ORA-01017: invalid useranme/password; logon denied". However I am able to connect using sqlplus and Oracle SQL Developer using the same TNS name and same exact credential. If I pick another TNS name (say Production), the connection is successful but I having trouble connecting to this non-prod instance.

Does anyone have any idea or suggestion?

Thank you.

  • Oracle is too dumb to lie about that. If you are getting an ORA-01017 you are either not supplying the credentials you think you are, or you are not connecting to the database you think you are. Do you happen to have multiple tnsnames.ora files lurking on the client machine? Don't say "no" until you actually check. – EdStevens Nov 1 '17 at 21:34
  • I just scanned my desktop. I have two tnsnames.ora and it's located in these two directories: C:\app\oracle\product\11.2.0\client_1\network\admin and C:\app\oracle\product\12.1.0\dbhome_1\NETWORK\ADMIN. The first contains the 11gR2 client install while the latter is the actual Oracle 12c database. When I make a change to the tnsnames.ora under the client directory, it gets reflected in the Windows ODBC screens. The ODBC screen does not look at the other tnsnames.ora. – sydney Nov 1 '17 at 23:16
  • Just for the purpose of this troubleshooting, I even deleted the tnsnames.ora under my 12c directory and I still get the ORA-01017. – sydney Nov 1 '17 at 23:22
0

You say that you have two clients installed - the 11g client and the 12c client. Are you certain that you are using the 12c client? Because if you deleted your tnsnames.ora file under the 12c client directory, your error message should have changed. This leads me to believe that you are likely not using the correct client. In a comment you said:

C:\app\oracle\product\11.2.0\client_1\network\admin and C:\app\oracle\product\12.1.0\dbhome_1\NETWORK\ADMIN. The first contains the 11gR2 client install while the latter is the actual Oracle 12c database. When I make a change to the tnsnames.ora under the client directory, it gets reflected in the Windows ODBC screens.

This makes me think that my suspicion about multiple client issue is correct. To test this, open a new command prompt window and issue the following command.

tnsping [DATABASE]

Where [DATABASE] is the TNS entry you would like to test. This will tell you which client your system is defaulting to. If you are in fact using the 12c client, you should see something similar to this immediately following the tnsping command:

TNS Ping Utility for 64-bit Windows: Version 12.1.0.2.0

If you do not see Version 12, you are using the 11g client. To fix this, you can modify your PATH system variable but you will need administrative access. Search "view advanced system settings" in the windows search bar, go to the "Advanced" tab, then navigate to Environment Variables. Scroll down the System Variables list, find PATH, and then modify the string so that the reference to the 12c client appears BEFORE the reference to the 11g client.

To make sure it's configured correctly, try another tnsping command.

  • Problem solved. This has nothing to do with me (or my desktop actually). It has to do with the way how the password is being restored by the script the Oracle DBA runs at night. I was told something about the encrypted password. They created a brand new user account as a test and I had no problem connecting via odbc. solllodolllo: just FYI. my desktop IS USING the 11g ORA. – sydney Nov 2 '17 at 19:53
  • Just to clarify ... My 12c directory contains the actual Oracle database and not the 12c client install. Well I guess if you install the 12c database you indirectly get the client binaries as well. – sydney Nov 2 '17 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.