Oracle 12c: ORA-01017: invalid username/password; logon denied — oracle-tech

    Forum Stats

  • 3,715,994 Users
  • 2,242,924 Discussions
  • 7,845,719 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Oracle 12c: ORA-01017: invalid username/password; logon denied

3360185
3360185 Member Posts: 5
edited April 2019 in ODP.NET

Attempting to connect using Oracle.ManagedDataAccess to a vendor database running 12c gets a ORA-01017.

Details:

    Vendor database: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

    Source systems are both windows 7 64bit.

            I've tried with Visual Studio 2017 and Visual Studio 2013 (different pc) with same results.

            I've updated Oracle Developer Tools for Visual Studio 2017 to 18.3.0 with no change.

     MDAC versions tried:

               V18.6.0 (NuGet)

               V18.3.0 (NuGet)

               12.1.21  (NuGet)

               4.121.2.0 ODAC release 4  (installed manually, didn't use NuGet)

What does work:

       SQL Developer

       TOAD

       sqlplus

       ODBC

          including OdbcConnection called in .net console app

       Unmanaged Data Access (same exact code just change using at the top to Oracle.DataAccess.Client).

       Also using MDAC, I can connect to the systems at my company which are oracle 10.2 and 11g without issue.

Details:

       Tried the various connection methods including with or without TNS and even with user/password passed in via OracleCredential parameter.

       The password is mixed case, contains a numeric and an special character.    I've varied my password to include only underscores or exclaimation point or plus sign without a change of behavior.

        I've tried the various ways quote the user id and password.

        My FipsAlgorithmPolicy is 0 (off)

       Here's one sample:

              User Id=MY_ID;Password="Aa12345+6";Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = VENDERHOST)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = MMMM)))

Answers

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2019

    If you remove the quotes around the password, you will be able to connect. At least, it works for me on my local 12.2 DB. I assume the quotes are not part of the password.

    If the quotes are part of the password, you should use escape sequences to indicate to .NET that you want to use the literal double quote.

    Here are other characters in .NET that requires escape sequences;

    https://docs.microsoft.com/en-us/cpp/c-language/escape-sequences?view=vs-2019

  • 3360185
    3360185 Member Posts: 5
    edited April 2019

    With or without the quotes, it fails.

    Also, with or without the quotes using unmanaged oracle, it works.   That is changing the using clause at the top and nothing else.

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2019

    Ok, that's weird. None of the behavior describes a known bug I'm familiar with. I did a quick search of our Bug DB and don't see symptoms that match all the characteristics of the issue you see.

    I don't think the password itself is the problem as you've tried various combinations and nothing works. It's more likely some other issue that only manifests itself as invalid credentials error.

    You may want to look at your other working Oracle client connections and configure managed ODP.NET to be exactly the same as that. If that doesn't work or you already tried that, I would recommend opening up a service request to find the root cause so that Oracle can fix the bug. Oracle Support will collect traces to understand exactly what you are using and why it's not letting the user log in.

  • 3360185
    3360185 Member Posts: 5
    edited April 2019

    The vendor database I'm referring to is highly secure requiring a gov't background check.   First I'll reach out to them with your insight that this is aberrant behavior to see whether they are willing to work with me to help diagnose why their database behaves differently than all the others I connect to.

    Failing that, I'll open an Oracle Support service request.

    Thank you!

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2019

    If it's a highly secure site, then there are likely other security protocols that are used in conjunction with user/password. It's possible one of those has not been setup correctly, which is why you see the error.

    One thing to keep in mind is that managed ODP.NET is a "homeless" Oracle installation. That means managed ODP.NET does not/can not use any Oracle Client Home security configuration that has been set up (unless you specifically point managed ODP.NET to the same *.ora files in the existing Oracle Home). You will need to replicate the security setup of your managed ODP.NET instance to the same as your other Oracle Homes.

    If your government customer has configured managed ODP.NET connections before, they probably have a checklist of steps to complete to ensure a successful connection.

Sign In or Register to comment.