ORA-01017: invalid username/password; logon denied when trying to connect via ODP.NET (Oracle.Manage — oracle-tech

    Forum Stats

  • 3,716,003 Users
  • 2,242,928 Discussions
  • 7,845,734 Comments

Discussions

Howdy, Stranger!

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

ORA-01017: invalid username/password; logon denied when trying to connect via ODP.NET (Oracle.Manage

4190195
4190195 Member Posts: 4
edited February 2020 in ODP.NET

Following code throws: ORA-01017: invalid username/password; logon denied

<span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">string constr </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">=</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"> </span><span class="str" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #7d2727;">"User Id=Name;Password=Password;Data Source=server:1521/service"</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">;</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"><br/>OracleConnection con </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">=</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"> new OracleConnection</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">(</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">constr</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">);</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"><br/>con</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">.</span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #101094;">Open</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">();</span>

SQL Developer, DBeaver connects without problems.

A connection by the deprecated "System.Data.OracleClient" namespace works also without problems.

FIPS is disabled.

System:

  • Oracle Server 11g (11.2.0.3.0)
  • Oracle.ManagedDataAccess 19.6.0
  • .Net Framework 4.8
  • Windows 10 1909

I would be very thankful for any help!

Answers

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited February 2020

    Are there any special characters in your password? If so, check if you need to use an escape character for the .NET string.

  • 4190195
    4190195 Member Posts: 4
    edited February 2020

    Thanks, for your answer, but my password only contains ASCII characters (lowercase letters and numbers).

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited February 2020

    The only thing that stands out is that you are using 11.2.0.3, which is no longer supported and ODP.NET 19.6 wasn't tested with. 11.2.0.4 is what is certified and tested. However, I'm not aware of anything with password authentication changing between 11.2.0.3 and 11.2.0.4.

    At this point, I usually ask customers to share their ODP.NET trace (level 7) and DB server side trace (level 16). That will provide more info on why the error is occurring. If nothing comes of that, we would look at your login details and DB setup details and perhaps recreate your setup to see if we could reproduce. It's up to you if you'd like to share on these on the forum. Most customers opt to open a service request.

    Something else you could try is to log in with another user's credentials and even another DB instance. That will help identify whether it's something with the app or something specific to the user credentials.

  • 4190195
    4190195 Member Posts: 4
    edited February 2020

    I've tested ODP.net connecting with Oracle XE 18c -> works fine.

    I tested ODP.net connecting with an other production Oracle 19c -> also works fine.

    I tested all ODP.net versions, available on NuGet connecting to Oracle 11.2.0.3 -> NOT working.

    It seems, it is really the version Oracle 11.2.0.3 in combination with each version of ODP.net, which does not work.

    Could you please test and verify, if you can connect to version 11.2.0.3 via ODP.net.

    A version update would be a very large effort for us.

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited February 2020

    If I tested with 11.2.0.3 and verified your error, it would not change the fact the recommendation would be to upgrade or patch your DB server.

    If it's possible for you to downgrade your managed ODP.NET version to 18c or 12.2, it's much more likely one of those works with DB 11.2.0.3.

  • 4190195
    4190195 Member Posts: 4
    edited February 2020

    I'm not able to upgrade the DB server - others depend on the version.

    I've already tried ALL managed ODP.NET versions from NuGet (12.1.12 ... 19.6.0) without success.

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited February 2020

    If the base managed ODP.NET 12.2 version doesn't work with DB 11.2.0.3, then the only other solution I can think of is to use unmanaged ODP.NET 11.2.

  • AndrewSayer
    AndrewSayer Member Posts: 12,998 Gold Crown
    edited February 2020
    4190195 wrote:I'm not able to upgrade the DB server - others depend on the version.
    I've already tried ALL managed ODP.NET versions from NuGet (12.1.12 ... 19.6.0) without success.

    Can you share the sqlnet.ora parameters used by the DB and the client. Can you also check what password version is used for this user by checking dba_users in the DB. Are you able to test with a new user or another database to confirm that the problem is not just in your syntax or genuinely using the wrong password

Sign In or Register to comment.